summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-03-28 00:30:13 -0700
committerJustin Santa Barbara <justin@fathomdb.com>2011-03-28 00:30:13 -0700
commitb6824009d9767f951373fb1b92c7cb2de83b0d97 (patch)
tree507a629eebc6c7dc7ade9b2ec425e009d107e009
parent8501cd94e3929918fdbfe0ca489304449f2f7fe3 (diff)
There were two periodic_tasks functions, due to parallel merges in compute.manager.
-rw-r--r--nova/compute/manager.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 468771f46..eb8bddd05 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -141,12 +141,6 @@ class ComputeManager(manager.SchedulerDependentManager):
"""
self.driver.init_host(host=self.host)
- def periodic_tasks(self, context=None):
- """Tasks to be run at a periodic interval."""
- super(ComputeManager, self).periodic_tasks(context)
- if FLAGS.rescue_timeout > 0:
- self.driver.poll_rescued_instances(FLAGS.rescue_timeout)
-
def _update_state(self, context, instance_id):
"""Update the state of an instance from the driver info."""
# FIXME(ja): include other fields from state?
@@ -1028,16 +1022,27 @@ class ComputeManager(manager.SchedulerDependentManager):
def periodic_tasks(self, context=None):
"""Tasks to be run at a periodic interval."""
+
+
error_list = super(ComputeManager, self).periodic_tasks(context)
if error_list is None:
error_list = []
try:
+ if FLAGS.rescue_timeout > 0:
+ self.driver.poll_rescued_instances(FLAGS.rescue_timeout)
+ except Exception as ex:
+ LOG.warning(_("Error during poll_rescued_instances: %s"),
+ unicode(ex))
+ error_list.append(ex)
+
+ try:
self._poll_instance_states(context)
except Exception as ex:
LOG.warning(_("Error during instance poll: %s"),
unicode(ex))
error_list.append(ex)
+
return error_list
def _poll_instance_states(self, context):