From b6824009d9767f951373fb1b92c7cb2de83b0d97 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Mon, 28 Mar 2011 00:30:13 -0700 Subject: There were two periodic_tasks functions, due to parallel merges in compute.manager. --- nova/compute/manager.py | 17 +++++++++++------ 1 file 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): -- cgit