xend: Fixes after backend xenstore config changes.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 1 Oct 2008 13:07:17 +0000 (14:07 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 1 Oct 2008 13:07:17 +0000 (14:07 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/image.py

index bad2723290ac07aadc2c3c11aa154280a20393c6..f48ac541b9b848b09115068523148ec31a3a9180 100644 (file)
@@ -1208,8 +1208,6 @@ class XendDomainInfo:
         return xstransact.Write(self.vmpath, *args)
 
     def _removeVm(self, *args):
-        if len(args) == 0:
-            self._removeVmPath()
         return xstransact.Remove(self.vmpath, *args)
 
     def _gatherVm(self, *args):
@@ -1778,6 +1776,7 @@ class XendDomainInfo:
         self._releaseDevices()
         # Remove existing vm node in xenstore
         self._removeVm()
+        self._removeVmPath()
         new_dom_info = self.info.copy()
         new_dom_info['name_label'] = self.info['name_label']
         new_dom_info['uuid'] = self.info['uuid']
@@ -2358,7 +2357,7 @@ class XendDomainInfo:
 
         paths = self._prepare_phantom_paths()
 
-        self._cleanupVm()
+        self._removeVmPath()
         if self.dompath is not None:
             try:
                 xc.domain_destroy_hook(self.domid)
@@ -2375,6 +2374,7 @@ class XendDomainInfo:
             self.cleanupDomain()
 
         self._cleanup_phantom_devs(paths)
+        self._cleanupVm()
 
         if "transient" in self.info["other_config"] \
            and bool(self.info["other_config"]["transient"]):
index 15605903df59919a826e9d13d4b40420d156e4b7..82d64afc49c81b2d96ab4b9904ebe48970d1a088 100644 (file)
@@ -502,7 +502,7 @@ class ImageHandler:
         if fifo_fd >= 0:
             self._openSentinel(sentinel_path_fifo)
             os.close(fifo_fd)
-            self.pid = self.vm.gatherVm(('image/device-model-pid', int))
+            self.pid = self.vm._gatherVm(('image/device-model-pid', int))
             log.debug("%s device model rediscovered, pid %s sentinel fifo %s",
                     name, self.pid, sentinel_path_fifo)
             self.sentinel_thread = thread.start_new_thread(self._sentinel_watch,())