WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Don't run reap() or domain_restarts() as side-effects of

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Don't run reap() or domain_restarts() as side-effects of refresh.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Sep 2005 23:56:13 +0000
Delivery-date: Fri, 16 Sep 2005 23:54:54 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 6a48f88101d3fc8aa591b171f66b091fd4fb35e6
# Parent  edd70af0fb22955e4c5dae375bb58970380df4d7
Don't run reap() or domain_restarts() as side-effects of refresh.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r edd70af0fb22 -r 6a48f88101d3 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Fri Sep 16 20:03:57 2005
+++ b/tools/python/xen/xend/XendDomain.py       Fri Sep 16 20:12:42 2005
@@ -96,7 +96,9 @@
         return map(lambda x: x.name, doms)
 
     def onReleaseDomain(self):
-        self.refresh(cleanup=True)
+        self.reap()
+        self.refresh()
+        self.domain_restarts()
 
     def watchReleaseDomain(self):
         from xen.xend.xenstore.xswatch import xswatch
@@ -150,7 +152,9 @@
                     self._delete_domain(domid)
             else:
                 self._delete_domain(domid)
-        self.refresh(cleanup=True)
+        self.reap()
+        self.refresh()
+        self.domain_restarts()
 
     def dom0_setup():
         dom0 = self.domain_lookup(0)
@@ -245,25 +249,18 @@
                     self.domain_restart_schedule(domid, reason)
             dominfo.destroy()
 
-    def refresh(self, cleanup=False):
+    def refresh(self):
         """Refresh domain list from Xen.
         """
-        if cleanup:
-            self.reap()
         doms = self.xen_domains()
         # Remove entries for domains that no longer exist.
         # Update entries for existing domains.
-        do_domain_restarts = False
         for d in self.domains.values():
             info = doms.get(d.domid)
             if info:
                 d.update(info)
-            elif d.restart_pending():
-                do_domain_restarts = True
-            else:
+            elif not d.restart_pending():
                 self._delete_domain(d.domid)
-        if cleanup and do_domain_restarts:
-            scheduler.now(self.domain_restarts)
 
     def update_domain(self, id):
         """Update information for a single domain.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Don't run reap() or domain_restarts() as side-effects of refresh., Xen patchbot -unstable <=