Francesco Romani has posted comments on this change.
Change subject: virt: Start all VM related stuff after switching to post-copy migration ......................................................................
Patch Set 8: Code-Review-1
(1 comment)
-1 because inline questions
https://gerrit.ovirt.org/#/c/63551/8/vdsm/virt/vm.py File vdsm/virt/vm.py:
Line 263: self._lastStatus = vmstatus.WAIT_FOR_LAUNCH Line 264: self._migrationSourceThread = migration.SourceThread(self) Line 265: self._kvmEnable = self.conf.get('kvmEnable', 'true') Line 266: self._incomingMigrationFinished = threading.Event() Line 267: self._incoming_migration_vm_running = threading.Event() Why can't we just do incomingMigrationFinished.set() earlier? I read the commit message reference about the status; I wonder if we can't just unblock the VM here and run with status == MIGRATION_DESTINATION, instead of keeping the creation thread around
Once libvirt delivers the event, we can just change state.
Would the above work? Line 268: self.id = self.conf['vmId'] Line 269: self._volPrepareLock = threading.Lock() Line 270: self._initTimePauseCode = None Line 271: self._initTimeRTC = int(self.conf.get('timeOffset', 0))