← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1160243] Re: Update states_payload before notify action failure

 

This is an extremely old bug, closing for now. Please reopen if it's
still an issue

** Changed in: nova
       Status: Incomplete => Invalid

-- 
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/1160243

Title:
  Update states_payload before notify action failure

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  During the action (i.e.: run_instance, resize_instance, etc), when
  some error occurs with the exception is thrown, the wrapper decorator
  @exception.wrap_exception will catch up the exception and call
  notifier.notify() with the original payload.

  By this way, the state of instance still be the old value from last
  time, but actually the state has been updated and been persisted into
  DB by:

  with self._error_out_instance_on_exception(context, instance['uuid'],    ----> persist state to 'error' into DB
                                                     reservations):

  So it is in-consist when the notification_handler to receive the
  message with the current instance state, please check the attachment,
  it is the message when exception is thrown during resize_instance(),
  the nova-compute (manager.py) to send out the notification, from the
  message we can see, the vm_state still be the old state "stopped".

  Here my suggestion is update the states_payload into payload before
  sending the notification from compute:

  states_payload = {
          "old_state": old_vm_state,
          "state": new_vm_state,
          "old_task_state": old_task_state,
          "new_task_state": new_task_state,
      }

      payload.update(states_payload)

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