[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Don't do device create on domain recreate.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID b5bf198f011383e4857978bd138b00ce8f76efe9
# Parent  5c0ec0b171f0e33323fde66ec24fbcd9ffe6d4c1
Don't do device create on domain recreate.
Also don't add XendDomainInfo object to XendDomain dictionary from
XendDomainInfo object but do it in XendDomain.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 5c0ec0b171f0 -r b5bf198f0113 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Sep 19 11:01:18 2005
+++ b/tools/python/xen/xend/XendDomain.py       Mon Sep 19 13:23:22 2005
@@ -276,6 +276,7 @@
         @return: domain
         """
         dominfo = XendDomainInfo.create(self.dbmap, config)
+        self._add_domain(dominfo)
         return dominfo
 
     def domain_restart(self, dominfo):
diff -r 5c0ec0b171f0 -r b5bf198f0113 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Sep 19 11:01:18 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Sep 19 13:23:22 2005
@@ -538,7 +538,6 @@
             self.init_image()
             self.configure_cpus(config)
             self.init_domain()
-            self.register_domain()
 
             # Create domain devices.
             self.configure_backends()
@@ -553,11 +552,6 @@
             traceback.print_exc()
             self.destroy()
             raise
-
-    def register_domain(self):
-        xd = get_component('xen.xend.XendDomain')
-        xd._add_domain(self)
-        self.exportToDB(save=True)
 
     def configure_cpus(self, config):
         try:
@@ -746,6 +740,8 @@
 
         @raise: VmError for invalid devices
         """
+        if self.recreate:
+            return
         if not self.rebooting():
             self.create_configured_devices()
         self.image.createDeviceModel()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.