summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2011-10-14 19:04:13 +0000
committerGerrit Code Review <review@openstack.org>2011-10-14 19:04:13 +0000
commitc9d2aa8a72c16bfdf76e9a8622143ef7cf500cca (patch)
tree900b256935b084f8c94fcc3852d9c270f148fb98 /nova/compute
parent80105fbc530b7fc842f1fa8f8318128cf067fb77 (diff)
parente50e9b44ab2b8b1184f93d24734af4b5862777bf (diff)
Merge "Adds the ability to automatically issue a hard reboot to instances that have been stuck in a 'rebooting' state for longer than a specified window."
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/manager.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 77283554e..2ccf44050 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -73,6 +73,10 @@ flags.DEFINE_string('console_host', socket.gethostname(),
flags.DEFINE_integer('live_migration_retry_count', 30,
"Retry count needed in live_migration."
" sleep 1 sec for each count")
+flags.DEFINE_integer("reboot_timeout", 0,
+ "Automatically hard reboot an instance if it has been "
+ "stuck in a rebooting state longer than N seconds."
+ " Set to 0 to disable.")
flags.DEFINE_integer("rescue_timeout", 0,
"Automatically unrescue an instance after N seconds."
" Set to 0 to disable.")
@@ -1777,6 +1781,14 @@ class ComputeManager(manager.SchedulerDependentManager):
error_list = []
try:
+ if FLAGS.reboot_timeout > 0:
+ self.driver.poll_rebooting_instances(FLAGS.reboot_timeout)
+ except Exception as ex:
+ LOG.warning(_("Error during poll_rebooting_instances: %s"),
+ unicode(ex))
+ error_list.append(ex)
+
+ try:
if FLAGS.rescue_timeout > 0:
self.driver.poll_rescued_instances(FLAGS.rescue_timeout)
except Exception as ex: