Catch exception from dumpCore when inside refreshShutdown.
authorEwan Mellor <ewan@xensource.com>
Fri, 5 Jan 2007 16:11:49 +0000 (16:11 +0000)
committerEwan Mellor <ewan@xensource.com>
Fri, 5 Jan 2007 16:11:49 +0000 (16:11 +0000)
Thanks to John Levon <levon@movementarian.org> for diagnosis and suggesting the
fix.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomainInfo.py

index b47083a88548dce3458fa6bc232d6e61f322e9ee..3a2fa3ef4f21843222da3ed3678460827186f595 100644 (file)
@@ -972,7 +972,12 @@ class XendDomainInfo:
                 self._writeVm(LAST_SHUTDOWN_REASON, 'crash')
 
                 if xroot.get_enable_dump():
-                    self.dumpCore()
+                    try:
+                        self.dumpCore()
+                    except XendError:
+                        # This error has been logged -- there's nothing more
+                        # we can do in this context.
+                        pass
 
                 restart_reason = 'crash'
                 self._stateSet(DOM_STATE_HALTED)
@@ -1164,7 +1169,10 @@ class XendDomainInfo:
     #
 
     def dumpCore(self, corefile = None):
-        """Create a core dump for this domain.  Nothrow guarantee."""
+        """Create a core dump for this domain.
+
+        @raise: XendError if core dumping failed.
+        """
         
         try:
             if not corefile: