Loading ccserver/jobs.py +7 −5 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ import time from datetime import datetime from threading import Thread, Lock from sjrpc.core import AsyncWatcher from ccserver.exceptions import (BadJobTypeError, UnknownJobError, JobError, UnknownObjectError) from ccserver.utils import AcquiresAllOrNone Loading Loading @@ -397,11 +399,11 @@ class ColdMigrationJob(BaseMigrationJob): self['func_cancel_xfer'] = cancel_xfer # Wait for the end of transfert: cids = set() cids.add(source.connection.async_call('vol_export', pool, name, dest.get_ip(), xferprop['port'])) cids.add(dest.connection.async_call('vol_import_wait', xferprop['id'])) msgs = self.manager.server.manager.wait(frozenset(cids)) watcher = AsyncWatcher() watcher.register(source.conn, 'vol_export', pool, name, dest.ip, xferprop['port']) watcher.register(dest.conn, 'vol_import_wait', xferprop['id']) msgs = watcher.wait() del self['func_cancel_xfer'] # Compare checksum of two answers: Loading Loading
ccserver/jobs.py +7 −5 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ import time from datetime import datetime from threading import Thread, Lock from sjrpc.core import AsyncWatcher from ccserver.exceptions import (BadJobTypeError, UnknownJobError, JobError, UnknownObjectError) from ccserver.utils import AcquiresAllOrNone Loading Loading @@ -397,11 +399,11 @@ class ColdMigrationJob(BaseMigrationJob): self['func_cancel_xfer'] = cancel_xfer # Wait for the end of transfert: cids = set() cids.add(source.connection.async_call('vol_export', pool, name, dest.get_ip(), xferprop['port'])) cids.add(dest.connection.async_call('vol_import_wait', xferprop['id'])) msgs = self.manager.server.manager.wait(frozenset(cids)) watcher = AsyncWatcher() watcher.register(source.conn, 'vol_export', pool, name, dest.ip, xferprop['port']) watcher.register(dest.conn, 'vol_import_wait', xferprop['id']) msgs = watcher.wait() del self['func_cancel_xfer'] # Compare checksum of two answers: Loading