mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Issue diagnostic if we find dying domains on Xend restart, because we will not
be able to show them any longer, as the paths in the store have gone. Don't call cleanupVm when a domain dies, as localhost-migrating VMs will be blown away by this (there is actually a race between the saving process and the resuming process). This fixes bug #276. Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
4c78f9561d
commit
6bee43e0b6
1 file changed
+25
-20
@@ -146,7 +146,6 @@ class XendDomain:
|
||||
if info:
|
||||
del self.domains[domid]
|
||||
info.cleanupDomain()
|
||||
info.cleanupVm()
|
||||
|
||||
|
||||
def refresh(self):
|
||||
@@ -161,25 +160,31 @@ class XendDomain:
|
||||
else:
|
||||
self._delete_domain(d.getDomid())
|
||||
for d in doms:
|
||||
if d not in self.domains and not doms[d]['dying']:
|
||||
try:
|
||||
dominfo = XendDomainInfo.recreate(doms[d])
|
||||
self._add_domain(dominfo)
|
||||
except:
|
||||
if d == PRIV_DOMAIN:
|
||||
log.exception(
|
||||
"Failed to recreate information for domain "
|
||||
"%d. Doing nothing except crossing my "
|
||||
"fingers.", d)
|
||||
else:
|
||||
log.exception(
|
||||
"Failed to recreate information for domain "
|
||||
"%d. Destroying it in the hope of "
|
||||
"recovery.", d)
|
||||
try:
|
||||
xc.domain_destroy(dom = d)
|
||||
except:
|
||||
log.exception('Destruction of %d failed.', d)
|
||||
if d not in self.domains:
|
||||
if doms[d]['dying']:
|
||||
log.error(
|
||||
'Cannot recreate information for dying domain %d. '
|
||||
'Xend will ignore this domain from now on.',
|
||||
doms[d]['dom'])
|
||||
else:
|
||||
try:
|
||||
dominfo = XendDomainInfo.recreate(doms[d])
|
||||
self._add_domain(dominfo)
|
||||
except:
|
||||
if d == PRIV_DOMAIN:
|
||||
log.exception(
|
||||
"Failed to recreate information for domain "
|
||||
"%d. Doing nothing except crossing my "
|
||||
"fingers.", d)
|
||||
else:
|
||||
log.exception(
|
||||
"Failed to recreate information for domain "
|
||||
"%d. Destroying it in the hope of "
|
||||
"recovery.", d)
|
||||
try:
|
||||
xc.domain_destroy(dom = d)
|
||||
except:
|
||||
log.exception('Destruction of %d failed.', d)
|
||||
|
||||
|
||||
## public:
|
||||
|
||||