← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1263044] [NEW] Resize/migrate cannot reschedule

 

Public bug reported:

In nova/compute/manager.py: def prep_resize()

The design intends to catch every host error exception and then
reschedule for resize/migrate like below:

        with self._error_out_instance_on_exception(context, instance['uuid'],
                                                   reservations):
            self.conductor_api.notify_usage_exists(
                    context, instance, current_period=True)
            self._notify_about_instance_usage(
                    context, instance, "resize.prep.start")
            try:
                self._prep_resize(context, image, instance,
                                  instance_type, reservations,
                                  request_spec, filter_properties,
                                  node)
            except Exception:                                  <<<<<intend to catch host exception, and reschedule for resize/migrate
                # try to re-schedule the resize elsewhere:
                exc_info = sys.exc_info()
                self._reschedule_resize_or_reraise(context, image, instance,
                        exc_info, instance_type, reservations, request_spec,
                        filter_properties)

However, in self._prep_resize(), it would cast request of
'resize_instance()'. Thus,  self._prep_resize() would return before
resize_instance() finished. And resize_instance() may throw exception
and reschedule is in need, but the exception would not be caught by
prep_resize() and reschedule would not work.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1263044

Title:
  Resize/migrate cannot reschedule

Status in OpenStack Compute (Nova):
  New

Bug description:
  In nova/compute/manager.py: def prep_resize()

  The design intends to catch every host error exception and then
  reschedule for resize/migrate like below:

          with self._error_out_instance_on_exception(context, instance['uuid'],
                                                     reservations):
              self.conductor_api.notify_usage_exists(
                      context, instance, current_period=True)
              self._notify_about_instance_usage(
                      context, instance, "resize.prep.start")
              try:
                  self._prep_resize(context, image, instance,
                                    instance_type, reservations,
                                    request_spec, filter_properties,
                                    node)
              except Exception:                                  <<<<<intend to catch host exception, and reschedule for resize/migrate
                  # try to re-schedule the resize elsewhere:
                  exc_info = sys.exc_info()
                  self._reschedule_resize_or_reraise(context, image, instance,
                          exc_info, instance_type, reservations, request_spec,
                          filter_properties)

  However, in self._prep_resize(), it would cast request of
  'resize_instance()'. Thus,  self._prep_resize() would return before
  resize_instance() finished. And resize_instance() may throw exception
  and reschedule is in need, but the exception would not be caught by
  prep_resize() and reschedule would not work.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1263044/+subscriptions


Follow ups

References