Commits
Evgeny Kravtsunov authored and Pavel Emelianov committed 326c9813336
[PATCH] CPT: TUN/TAP support in checkpointing Now live migration of VE with openvpn inside is supported. 1) tun/tap driver updated: - Field void *bind_file added to tun_struct. Field is used for storing pointer to open /dev/net/tun file. This pointer is to be written to dumpfile: on restore it is necessary to carry out binding of created tun_struct to open file /dev/net/tun. 2) dump: - Introduced struct cpt_tuntap_image for storing tun/tap device related data. Corresponding object type CPT_OBJ_NET_TUNTAP added. - Flag value CPT_DENTRY_TUNTAP introduced. It is necessary for setting corresponding bit in cpt_lflags field of cpt_file_image for /dev/net/tun file. - Call of function cpt_dump_ifinfo is placed after cpt_dump_files_struct and cpt_dump_fs_struct. This is necessary for finding /dev/net/tun file pos in file image and storing pos value during dump of tun/tap device. - Function cpt_dump_tuntap introduced, cpt_dump_link is updated by call of cpt_dump_tuntap. The CPT_SECT_NET_DEVICE section, that is common for all net devices is used for tun/tap device: tun->dev netdevice data is stored in cpt_netdev_image image type and tun_struct data is stored inside cpt_tuntap_image. Both cpt_netdev_image and cpt_tuntap_image images are stored inside CPT_SECT_NET_DEVICE section. - Set of checks updated that allow dumping netdevices (in check_unsupported_netdevices and cpt_dump_link) and open files (dump_one_file, dump_content_chrdev). 3) restore: - Function rst_restore_tuntap introduced. Call of rst_restore_tuntap is placed to rst_restore_netdev. rst_restore_tuntap creates tun/tap netdevice and tun_struct on destination HN, initializes them by values taken from cpt_netdev_image and cpt_tuntap_image objects, restores /dev/net/tun file from corresponding position of cpt_file_image and binds opened file to newly created tun_struct. - Function open_special updated by adding check for tun/tap related file. This makes possible to restore /dev/net/tun char device by calling rst_file. http://bugzilla.openvz.org/show_bug.cgi?id=642