← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1301690] Re: should rollback quota if 2 confirm_resize operations are executed concurrently

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-rc1

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

Title:
  should rollback quota if 2 confirm_resize operations are executed
  concurrently

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  quota is reserved when confirm_resize is executed, if we found one migration is already in 'confirmed' status 
  we directly return without rollback the quota.

  
  def confirm_resize(self, context, instance, reservations, migration):

          quotas = quotas_obj.Quotas.from_reservations(context,
                                                       reservations,
                                                       instance=instance)

          @utils.synchronized(instance['uuid'])
          def do_confirm_resize(context, instance, migration_id):
              ......
              try:
                  # TODO(russellb) Why are we sending the migration object just
                  # to turn around and look it up from the db again?
                  migration = migration_obj.Migration.get_by_id(
                                      context.elevated(), migration_id)
              except exception.MigrationNotFound:
                  LOG.error(_("Migration %s is not found during confirmation") %
                              migration_id, context=context, instance=instance)
                  return

              if migration.status == 'confirmed':
                  LOG.info(_("Migration %s is already confirmed") %
                              migration_id, context=context, instance=instance)
                  return

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


References