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

[Xen-changelog] [xen-unstable] [XEND] Ignore dying domains when refreshing list of domains.



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID de7c20b6eaae7b9ac71eb3b63b5bff5b6d6a5220
# Parent  ddc4bc24f07c9cf833b2099e79f5e23c49822ed9
[XEND] Ignore dying domains when refreshing list of domains.

Also cleanup stored configuration if managed domain is deleted.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r ddc4bc24f07c -r de7c20b6eaae tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Nov 09 15:38:15 2006 +0000
+++ b/tools/python/xen/xend/XendDomain.py       Thu Nov 09 16:05:00 2006 +0000
@@ -319,6 +319,7 @@ class XendDomain:
     def _managed_domain_unregister(self, dom):
         try:
             if self.is_domain_managed(dom):
+                self._managed_config_remove(dom.get_uuid())
                 del self.managed_domains[dom.get_uuid()]
         except ValueError:
             log.warn("Domain is not registered: %s" % dom.get_uuid())
@@ -378,15 +379,14 @@ class XendDomain:
         running = self._running_domains()
         for dom in running:
             domid = dom['domid']
-            if domid in self.domains:
+            if domid in self.domains and dom['dying'] != 1:
                 self.domains[domid].update(dom)
 
         # remove domains that are not running from active domain list.
         # The list might have changed by now, because the update call may
         # cause new domains to be added, if the domain has rebooted.  We get
         # the list again.
-        running = self._running_domains()
-        running_domids = [d['domid'] for d in running]
+        running_domids = [d['domid'] for d in running if d['dying'] != 1]
         for domid, dom in self.domains.items():
             if domid not in running_domids and domid != DOM0_ID:
                 self._remove_domain(dom, domid)

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