← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1727719] Re: Placement: resource provider can't be deleted if there is trait associated with it

 

Reviewed:  https://review.openstack.org/516880
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5de3317d68df8fdc6fdaff62baa62822c669bb93
Submitter: Zuul
Branch:    master

commit 5de3317d68df8fdc6fdaff62baa62822c669bb93
Author: Takashi NATSUME <natsume.takashi@xxxxxxxxxxxxx>
Date:   Wed Nov 1 14:03:12 2017 +0900

    [placement] Fix foreign key constraint error
    
    When deleting a resource provider,
    if there are traits on the resource provider,
    a foreign key constraint error occurs.
    
    So add deleting trait associations for the resource provider
    (records in the 'resource_provider_traits' table)
    when deleting the resource provider.
    
    Change-Id: I6874567a14beb9b029765bf49067af6de17f2bd2
    Closes-Bug: #1727719


** 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/1727719

Title:
  Placement: resource provider can't be deleted if there is trait
  associated with it

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) pike series:
  New

Bug description:
  nova: 6d61c61a32

  To reproduce:
  1. Create a new RP
  2. Associate a trait with it.
  3. Try to delete the RP.

  Error:
  Response: 
  {"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}

  (Pdb) __exception__
  (<class 'oslo_db.exception.DBReferenceError'>, DBReferenceError(u"(pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`nova_api`.`resource_provider_traits`, CONSTRAINT `resource_provider_traits_ibfk_1` FOREIGN KEY (`resource_provider_id`) REFERENCES `resource_providers` (`id`))') [SQL: u'DELETE FROM resource_providers WHERE resource_providers.id = %(id_1)s'] [parameters: {u'id_1': 17}]",))

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


References