bitkeeper revision 1.1159.6.2 (41176d3eHxHC1VGHGu53bIhNRwFGGg)

Keep domain list up-to-date on domain shutdown.
This commit is contained in:
mjw@wray-m-3.hpl.hp.com committed 2004-08-09 12:25:34 +00:00
1 parent 3d3c4e1d63
commit 754df6c6f4
1 file changed
+7 -1
+7 -1
View File
@@ -232,17 +232,23 @@ class XendDomain:
not(d['running'] or d['paused'] or d['blocked']))
if dead:
casualties.append(d)
destroyed = 0
for d in casualties:
id = str(d['dom'])
log.debug('XendDomain>reap> domain died id=%s', id)
if d['shutdown']:
reason = XendDomainInfo.shutdown_reason(d['shutdown_reason'])
log.debug('XendDomain>reap> shutdown id=%s reason=%s', id, reason)
if reason in ['suspend']:
continue
if reason in ['poweroff', 'reboot']:
self.domain_restart_schedule(id, reason)
destroyed += 1
self.final_domain_destroy(id)
if self.domain_restarts_exist():
self.domain_restarts_schedule()
if destroyed:
self.refresh_schedule(delay=1)
def refresh(self):
"""Refresh domain list from Xen.
@@ -268,7 +274,7 @@ class XendDomain:
d.update(info)
else:
self._delete_domain(d.id)
self.reap_schedule(1)
self.reap_schedule(delay=1)
def update_domain(self, id):
"""Update the saved info for a domain.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.