def __init__(self, p_type, host): self._mstat = mstats.migration_stats() self.iteration = 0 self.prev_stats = None print "Connecting to target host" self.th = xem_rpc.rpc_proxy(host) self.data_sk = self.th.open_socket("datask") print "Setting up local" self.img = images.phaul_images("dmp") self.criu = criu_api.criu_conn(self.data_sk) self.htype = p_haul_type.get_src(p_type) if not self.htype: raise Exception("No htype driver found") self.fs = self.htype.get_fs() if not self.fs: raise Exception("No FS driver found") self.pid = self.htype.root_task_pid() self.fs.set_target_host(host[0]) print "Setting up remote" self.th.setup(p_type)
def rpc_setup(self, htype_id): logging.info("Setting up service side %s", htype_id) self.img = images.phaul_images("rst") self.criu_connection = criu_api.criu_conn(self._mem_sk) self.htype = htype.get_dst(htype_id) # Create and start fs receiver if current p.haul module provide it self.__fs_receiver = self.htype.get_fs_receiver(self._fs_sk) if self.__fs_receiver: self.__fs_receiver.start()
def rpc_setup(self, htype_id): logging.info("Setting up service side %s", htype_id) self.img = images.phaul_images("rst") self.criu_connection = criu_api.criu_conn(self._mem_sk) self.htype = p_haul_type.get_dst(htype_id) # Create and start fs receiver if current p.haul module provide it self.__fs_receiver = self.htype.get_fs_receiver(self._fs_sk) if self.__fs_receiver: self.__fs_receiver.start()
def rpc_setup(self, htype_id, mode): logging.info("Setting up service side %s", htype_id) self.__mode = mode self.htype = htype.get_dst(htype_id) self.__fs_receiver = self.htype.get_fs_receiver(self.connection.fdfs) if self.__fs_receiver: self.__fs_receiver.start_receive() if iters.is_live_mode(self.__mode): self.img = images.phaul_images("rst") self.criu_connection = criu_api.criu_conn(self.connection.mem_sk)
def __init__(self, p_type, connection): self.connection = connection self.target_host = xem_rpc_client.rpc_proxy(self.connection.rpc_sk) logging.info("Setting up local") self.criu_connection = criu_api.criu_conn(self.connection.mem_sk) self.img = images.phaul_images("dmp") self.htype = p_haul_type.get_src(p_type) if not self.htype: raise Exception("No htype driver found") self.fs = self.htype.get_fs(self.connection.fs_sk) if not self.fs: raise Exception("No FS driver found") self.pid = self.htype.root_task_pid() self.pre_dump = PRE_DUMP_AUTO_DETECT logging.info("Setting up remote") self.target_host.setup(p_type)
def __init__(self, p_type, connection): self.connection = connection self.target_host = xem_rpc_client.rpc_proxy(self.connection.rpc_sk) logging.info("Setting up local") self.criu_connection = criu_api.criu_conn(self.connection.mem_sk) self.img = images.phaul_images("dmp") self.htype = htype.get_src(p_type) if not self.htype: raise Exception("No htype driver found") self.fs = self.htype.get_fs(self.connection.fs_sk) if not self.fs: raise Exception("No FS driver found") self.pid = self.htype.root_task_pid() self.pre_dump = PRE_DUMP_AUTO_DETECT logging.info("Setting up remote") self.target_host.setup(p_type)
def __init__(self, p_type, dst_id, mode, connection): self.__mode = mode self.connection = connection self.target_host = xem_rpc_client.rpc_proxy(self.connection.rpc_sk) logging.info("Setting up local") self.htype = htype.get_src(p_type) if not self.htype: raise Exception("No htype driver found") self.fs = self.htype.get_fs(self.connection.fdfs) if not self.fs: raise Exception("No FS driver found") self.img = None self.criu_connection = None if is_live_mode(self.__mode): self.img = images.phaul_images("dmp") self.criu_connection = criu_api.criu_conn(self.connection.mem_sk) logging.info("Setting up remote") p_dst_type = (p_type[0], dst_id if dst_id else p_type[1]) self.target_host.setup(p_dst_type, mode)
def rpc_setup(self, htype_id): print "Setting up service side", htype_id self.img = images.phaul_images("rst") self.criu = criu_api.criu_conn(self.data_sk) self.htype = p_haul_type.get_dst(htype_id)