qemu: make note on hostIds, and the need make sure they match ours in case we accept a migrated instance
qemu: set state to running to avoid persistent states of MigrateTrans from the origin host when the NM restarts
git-svn-id: https://svn.apache.org/repos/asf/incubator/tashi/trunk@1370637 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/tashi/nodemanager/vmcontrol/qemu.py b/src/tashi/nodemanager/vmcontrol/qemu.py
index 8d9e5ef..627579a 100644
--- a/src/tashi/nodemanager/vmcontrol/qemu.py
+++ b/src/tashi/nodemanager/vmcontrol/qemu.py
@@ -593,6 +593,9 @@
child.ptyFile = None
child.vncPort = -1
child.instance.vmId = child.pid
+ # XXXstroucki what about our hostId?
+ # we need to make sure we don't report up a VM
+ # with an inaccurate hostId.
# Add a token to this new child object so that
# we don't mistakenly clean up when matchHostPids
@@ -756,6 +759,7 @@
(vmId, cmd) = self.__startVm(instance, "tcp:0.0.0.0:%d" % (port))
transportCookie = cPickle.dumps((port, vmId, socket.gethostname()))
child = self.__getChildFromPid(vmId)
+ child.instance.state = InstanceState.Running
child.cmd = cmd
child.transportCookie = transportCookie
self.__saveChildInfo(child)