[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Issue diagnostic if we find dying domains on Xend restart, because we will not



# HG changeset patch
# User emellor@ewan
# Node ID b0bc53c9d5b6c9c5c8ff79272f7c25c7eaaf4d2a
# Parent  971e7c7411b358dec5c48fe62f55e56de9e38a94
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@xxxxxxxxxxxxx>

diff -r 971e7c7411b3 -r b0bc53c9d5b6 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Oct  6 09:13:11 2005
+++ b/tools/python/xen/xend/XendDomain.py       Thu Oct  6 09:16:50 2005
@@ -146,7 +146,6 @@
         if info:
             del self.domains[domid]
             info.cleanupDomain()
-            info.cleanupVm()
 
 
     def refresh(self):
@@ -161,25 +160,31 @@
             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:

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.