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

[Xen-devel] [PATCh]: Fix too early restart in case core dump active



Changeset 19546 fix avoidance to restart domain in case of crash. 
Problem is in case that core dump is active. Time needed for dump can 
extend guest run time so it is greater than MINIMUM_RESTART_TIME. This
cause to dump-restart loop.

This patch store crash time so it can be used instead of current time.

Patch:
--
diff -r 9f49667fec71 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Jul 30 15:22:39 2010 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Sep 01 10:17:09 2010 +0200
@@ -2057,6 +2057,7 @@
                     # the domain for debugging.  Leave it alone.
                     return
 
+                self.info['crash_time'] = time.time()
                 log.warn('Domain has crashed: name=%s id=%d.',
                          self.info['name_label'], self.domid)
                 self._writeVm(LAST_SHUTDOWN_REASON, 'crash')
@@ -2185,10 +2186,13 @@
             self.destroy()
             return
 
         old_domid = self.domid
         self._writeVm(RESTART_IN_PROGRESS, 'True')
 
-        elapse = time.time() - self.info['start_time']
+        if self.infoIsSet('crash_time'):
+            elapse = self.info['crash_time'] - self.info['start_time']
+        else:
+            elapse = time.time() - self.info['start_time']
         if elapse < MINIMUM_RESTART_TIME:
             log.error('VM %s restarting too fast (Elapsed time: %f seconds). '
                       'Refusing to restart to avoid loops.',
-- 
Miroslav Rezanina
Software Engineer - Virtualization Team - XEN kernel


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


 


Rackspace

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