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

[Xen-changelog] Fix domain list build/cleanup code with xend subdirectory.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID f562c0f1d2226ece0593eaa9e373a54b116ae0d0
# Parent  d38da169752eb08e42fd13f1a465d36a09b50f3a
Fix domain list build/cleanup code with xend subdirectory.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r d38da169752e -r f562c0f1d222 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Tue Sep 13 16:56:02 2005
+++ b/tools/python/xen/xend/XendDomain.py       Tue Sep 13 16:57:45 2005
@@ -130,8 +130,11 @@
         doms = self.xen_domains()
         self.dbmap.readDB()
         for domdb in self.dbmap.values():
+            if not domdb.has_key("xend"):
+                continue
+            db = domdb.addChild("xend")
             try:
-                domid = int(domdb.id)
+                domid = int(db.id)
             except:
                 domid = None
             # XXX if domid in self.domains, then something went wrong
@@ -139,7 +142,7 @@
                 domdb.delete()
             elif domid in doms:
                 try:
-                    self._new_domain(domdb['uuid'], domdb, doms[domid]) 
+                    self._new_domain(db.uuid, db, doms[domid]) 
                 except Exception, ex:
                     log.exception("Error recreating domain info: id=%d", domid)
                     self._delete_domain(domid)
@@ -204,8 +207,11 @@
                 eserver.inject('xend.domain.died', [info.name, info.id])
         # XXX this should not be needed
         for domdb in self.dbmap.values():
+            if not domdb.has_key("xend"):
+                continue
+            db = domdb.addChild("xend")
             try:
-                domid = int(domdb.id)
+                domid = int(db.id)
             except:
                 domid = None
             if (domid is None) or (domid == id):

_______________________________________________
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®.