Consumers with no allocations should be auto-deleted

Bug #1780799 reported by Jay Pipes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Jay Pipes
Queens
In Progress
Undecided
melanie witt

Bug Description

When an allocation is POST'd or PUT'd and the set of allocations for a consumer is deleted (indicated with an empty dict for the allocations), then the consumer should be automatically deleted.

Tags: api placement
Revision history for this message
Matt Riedemann (mriedem) wrote :

Presumably (obviously) this also includes DELETE /allocations/{consumer_id}

https://developer.openstack.org/api-ref/placement/#delete-allocations

tags: added: api
Revision history for this message
Matt Riedemann (mriedem) wrote :

I don't think this is really high severity, I'd consider it medium or low. The stale consumer records don't really hurt anything, and they'd get used again later if that consumer has new allocations.

Changed in nova:
importance: High → Low
Changed in nova:
assignee: nobody → Jay Pipes (jaypipes)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit f0f680b492c82f4f5c4163b0534dacc315b6dce5
Author: Jay Pipes <email address hidden>
Date: Mon Jul 9 12:41:05 2018 -0400

    delete consumers which no longer have allocations

    We made the decision [1] to delete consumer records when those consumers
    no longer had any allocations referring to them (as opposed to keeping
    those consumer records around and incrementing the consumer generation
    for them).

    This patch adds a small check within the larger
    AllocationList.create_all() and AllocationList.delete_all() DB
    transactions that deletes consumer records when no allocation records
    remain that reference that consumer. This patch does not, however,
    attempt to clean up any "orphaned" consumer records that may have been
    created in previous calls to PUT|POST /allocations that removed the last
    remaining allocations for a consumer.

    [1] https://goo.gl/DpAGbW

    Change-Id: Ic2b82146d28be64b363b0b8e2e8d180b515bc0a0
    Closes-bug: #1780799

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

This issue was fixed in the openstack/nova 18.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/697398

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/queens)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/queens
Review: https://review.opendev.org/c/openstack/nova/+/697398
Reason: This branch transitioned to End of Life for this project, open patches needs to be closed to be able to delete the branch.

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.