← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1693349] Re: trying to create a resource provider with an already in use uuid causes misleading error

 

Reviewed:  https://review.openstack.org/468928
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=863f0ce0b543631cf13b3d5d6491659931e2697e
Submitter: Jenkins
Branch:    master

commit 863f0ce0b543631cf13b3d5d6491659931e2697e
Author: Chris Dent <cdent@xxxxxxxxxxxxx>
Date:   Mon May 29 17:27:22 2017 +0000

    [placement] Disambiguate resource provider conflict message
    
    When creating a resource provider, if the uuid or name (or both)
    of the resource provider is already being used a 409 response is
    returned. Prior to this change the error message always mentioned
    the name of the resource provider, even if it was not the cause of
    the duplication. That's misleading and unfriendly.
    
    The new code will list the field and the value of the field that
    was duplicated. From looking at the olso_db code that creates a
    DBDuplicateEntry it appears that sometimes, but not always, the
    exception could list both fields, so allowance for that is made
    in the message output and the related gabbi tests.
    
    Because this changes the error message, but not the error response
    code, this does not violate the api interoperability guidelines[1],
    so I'm willing to say this doesn't require a microversion, and thus
    does not require a spec.
    
    [1] http://specs.openstack.org/openstack/api-wg/guidelines/api_interoperability.html
    If we do think this is a violation, then the guideline should be
    made more explicit.
    
    Change-Id: Ibafbfd8302977a2b4e9250fbb5ada283b69d3c25
    Closes-Bug: #1693349


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  trying to create a resource provider with an already in use uuid
  causes misleading error

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  (This is mostly a reminder bug for cdent, by cdent, so I don't forget
  it while doing something else.)

  POST is used to create a resource provider. 'name' is required, 'uuid'
  is optional, if you don't provide one one will be created.

  If you create a provider with $uuid_1 and then create another one with
  a different name but $uuid_1 the error message will be:

     'Conflicting resource provider %(name)s already exists.'

  Which is not actually true. We need to check the columns in the
  DBDuplicateEntry response to choose a to either use name or uuid as
  appropriate.

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


References