WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCh]: Fix too early restart in case core dump active
From: Miroslav Rezanina <mrezanin@xxxxxxxxxx>
Date: Wed, 1 Sep 2010 04:19:19 -0400 (EDT)
Delivery-date: Wed, 01 Sep 2010 01:20:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1697246995.1779611283329132103.JavaMail.root@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCh]: Fix too early restart in case core dump active, Miroslav Rezanina <=