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/
Home Products Support Community News


[Xen-changelog] Fix reboot logic. An indentation error meant that every

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix reboot logic. An indentation error meant that every second reboot would
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Oct 2005 22:34:05 +0000
Delivery-date: Sun, 30 Oct 2005 22:31:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID f994ee35da2350ed76c6bf732d267ac6c90a4dd5
# Parent  e70ea9465b310e1cba9678ac4e9ad534bb8b670a
Fix reboot logic.  An indentation error meant that every second reboot would
be refused, with the domain being destroyed instead.

Further fix for reboot logic when using on_reboot=rename-restart: the incorrect
node was being removed once restart has completed, leaving Xend to conclude
later that it had crashed in the middle of a restart.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r e70ea9465b31 -r f994ee35da23 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 27 09:53:02 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Oct 28 12:02:06 2005
@@ -1275,7 +1275,6 @@
         now = time.time()
         rst = self.readVm('xend/previous_restart_time')
-        log.error(rst)
         if rst:
             rst = float(rst)
             timeout = now - rst
@@ -1284,8 +1283,8 @@
                     'VM %s restarting too fast (%f seconds since the last '
                     'restart).  Refusing to restart to avoid loops.',
                     self.info['name'], timeout)
-            self.destroy()
-            return
+                self.destroy()
+                return
         self.writeVm('xend/previous_restart_time', str(now))
@@ -1306,7 +1305,11 @@
                 log.exception('Failed to restart domain %d.', self.domid)
-            self.removeVm('xend/restart_in_progress')
+            # new_dom's VM will be the same as this domain's VM, except where
+            # the rename flag has instructed us to call preserveForRestart.
+            # In that case, it is important that we use new_dom.removeVm, not
+            # self.removeVm.
+            new_dom.removeVm('xend/restart_in_progress')
         # self.configure_bootloader()
         #        self.exportToDB()

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix reboot logic. An indentation error meant that every second reboot would, Xen patchbot -unstable <=