← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1746374] Re: Report client _delete_inventory violates generation consistency

 

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

commit 26c593c91f008caab92ed52156dfe2d898955d3f
Author: Eric Fried <efried@xxxxxxxxxx>
Date:   Tue Jan 30 21:53:52 2018 -0600

    Avoid inventory DELETE API (no conflict detection)
    
    SchedulerReportClient._delete_inventory used the DELETE
    /resource_providers/{u}/inventories API, which does not provide a way to
    send the generation down (see bug 1746373), and is therefore subject to
    concurrency errors.
    
    This change set removes the _delete_inventory method and uses PUT
    /resource_providers/{u}/inventories with an empty 'inventories' dict
    instead, because that API *does* take the generation in the payload.
    
    Doing this makes moot part of bug 1746075 by removing one of the code
    paths that exploits undocumented knowledge of how placement uses the
    generation counter.
    
    Change-Id: Ia8131b32debd56b28315ef430ee4e8888b6f56e7
    Closes-Bug: #1746374
    Related-Bug: #1746373
    Related-Bug: #1746075


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

Title:
  Report client _delete_inventory violates generation consistency

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  SchedulerReportClient._delete_inventory uses the DELETE
  /resource_providers/{u}/inventories API, which does not provide a way
  to send the generation down (see related bug [1]), and is therefore
  subject to concurrency errors.

  Until/unless an alternative becomes available, we should be using PUT
  /resource_providers/{u}/inventories with an empty 'inventories' dict,
  because that API *does* take the generation in the payload.  (If we do
  this, we also make moot part of related bug [2].)

  Related bugs:
  [1] https://bugs.launchpad.net/nova/+bug/1746075
  [2] https://bugs.launchpad.net/nova/+bug/1746373

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


References