This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] [XEND] Ignore dying domains when refreshi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Ignore dying domains when refreshing list of domains.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 09 Nov 2006 18:40:23 +0000
Delivery-date: Thu, 09 Nov 2006 10:41:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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):
             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:
         # 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Ignore dying domains when refreshing list of domains., Xen patchbot-unstable <=