mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[XEND] Revert changes in changeset 12328
Mistakenly reverted some fixes for rebooting, un-reverting. Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
e1e7aa6e07
commit
13dde37355
1 file changed
+14
-13
@@ -377,24 +377,12 @@ class XendDomain:
|
||||
@rtype: None
|
||||
"""
|
||||
|
||||
# update information for all running domains
|
||||
# - like cpu_time, status, dying, etc.
|
||||
running = self._running_domains()
|
||||
running_domids = [d['domid'] for d in running if d['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.
|
||||
for domid, dom in self.domains.items():
|
||||
if domid not in running_domids and domid != DOM0_ID:
|
||||
self._remove_domain(dom, domid)
|
||||
|
||||
# Add domains that are not already tracked but running in Xen,
|
||||
# and update domain state for those that are running and tracked.
|
||||
for dom in running:
|
||||
domid = dom['domid']
|
||||
if domid in self.domains and dom['dying'] != 1:
|
||||
if domid in self.domains:
|
||||
self.domains[domid].update(dom)
|
||||
elif domid not in self.domains and dom['dying'] != 1:
|
||||
try:
|
||||
@@ -408,6 +396,19 @@ class XendDomain:
|
||||
log.exception("Hard destruction of domain failed: %d" %
|
||||
domid)
|
||||
|
||||
# update information for all running domains
|
||||
# - like cpu_time, status, dying, etc.
|
||||
# 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 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)
|
||||
|
||||
|
||||
|
||||
def _add_domain(self, info):
|
||||
"""Add a domain to the list of running domains
|
||||
|
||||