xend: Crash the domain if qemu-dm stops running
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 11:07:34 +0000 (11:07 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 11:07:34 +0000 (11:07 +0000)
The comment about the lack of restart prevention is not accurate.

Bump the minimum restart time to 60 seconds.

Signed-off-by: John Levon <john.levon@sun.com>
tools/python/xen/xend/XendConstants.py
tools/python/xen/xend/image.py

index 3130f75c08c985238fb5c64fe21eeb552c41b6bb..fa72edc5af2d629933cdb3fcd5368042625d29f0 100644 (file)
@@ -96,7 +96,7 @@ SHUTDOWN_TIMEOUT = (60.0 * 5)
 ZOMBIE_PREFIX = 'Zombie-'
 
 """Minimum time between domain restarts in seconds."""
-MINIMUM_RESTART_TIME = 20
+MINIMUM_RESTART_TIME = 60
 
 RESTART_IN_PROGRESS = 'xend/restart_in_progress'
 DUMPCORE_IN_PROGRESS = 'xend/dumpcore_in_progress'
index 7260551069df9a3bf9d8fec313939d18820c4eec..d028e4577671a0d2a1b98d34f7e89fca7d7c63d9 100644 (file)
@@ -487,11 +487,7 @@ class ImageHandler:
 
     def _dmfailed(self, message):
         log.warning("domain %s: %s", self.vm.getName(), message)
-        # ideally we would like to forcibly crash the domain with
-        # something like
-        #    xc.domain_shutdown(self.vm.getDomid(), DOMAIN_CRASH)
-        # but this can easily lead to very rapid restart loops against
-        # which we currently have no protection
+        xc.domain_shutdown(self.vm.getDomid(), DOMAIN_CRASH)
 
     def recreate(self):
         if self.device_model is None: