When deleting a resource provider in the placement api the rp's associated aggregates are not cleaned up

Bug #1647697 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Ed Leafe

Bug Description

When deleting a resource provider the spec says that the resource provider's inventory and associated aggregates should be deleted:

    http://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/generic-resource-pools.html#delete-resource-providers-uuid

In version 1.1 of the placement API, inventory is being deleted, but aggregate associations are left untouched. This means that in the following case the resulting aggregates will be wrong:

* create an rp with a known uuid (this is allowed and expected)
* associate some aggregates (a, b, c)
* delete the rp
* recreate the rp with same uuid
* query the associated aggregates get 'a, b, c' but expect []

Note that the set_aggregates functionality (and the associated PUT API) is a full replace so any time the associated aggregates are updated, the input in that request becomes the whole set of associated aggregates. This bug is only present in the case where aggregates were present on the previous incarnation of a resource provider but should not be on the current incarnation.

Tags: placement
Revision history for this message
Chris Dent (cdent) wrote :

See the _get_aggregates and _delete methods on the ResourceProvider object in nova.objects.resource_provider for more details.

Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/407707

Changed in nova:
assignee: nobody → Ed Leafe (ed-leafe)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/407707
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=693a535c0c363ab44d023be035dbb99a9dfb0397
Submitter: Jenkins
Branch: master

commit 693a535c0c363ab44d023be035dbb99a9dfb0397
Author: EdLeafe <email address hidden>
Date: Tue Dec 6 21:02:32 2016 +0000

    Cascade deletes of RP aggregate associations

    Currently when we delete a resource provider, the associations it has to
    aggregates are not also deleted. This patch adds the deletion of all
    ResourceProviderAggregate associations for that RP.

    Closes-Bug: #1647697

    Change-Id: I47ebd1464256f2fbc7505a5c1b3c74a4ba89ccf0

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b2

This issue was fixed in the openstack/nova 15.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.