[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Don't run reap() or domain_restarts() as side-effects of refresh.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |