← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1746075] Re: Report client placement cache consistency is broken

 

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

commit 60c62f7267e578365720f85e4fd068b8d9b290df
Author: Eric Fried <efried@xxxxxxxxxx>
Date:   Thu Mar 1 15:41:07 2018 +0000

    Stop assuming initial provider generation is 0
    
    SchedulerReportClient._create_resource_provider used to assume the
    generation of a freshly-created resource provider is zero, and store
    that value in the provider tree cache.  This violates the opacity of the
    generation in the API.
    
    The fix implemented herein is two-pronged.  We exploit the
    implementation of the related blueprint, returning the payload of the
    POST /resource_providers response if available.  Otherwise (if the
    available placement microversion is older), rather than assuming
    anything about the new provider, we perform a GET
    /resource_providers/{uuid} and return the result (which contains the
    generation).
    
    Change-Id: I8e0a37100b0876916db50b08f95f427cb0456616
    Closes-Bug: #1746075
    Related-Blueprint: generation-from-create-provider


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

Title:
  Report client placement cache consistency is broken

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Today the report client makes assumptions about how resource provider
  generation is calculated by the placement service.  Specifically, that
  it starts at zero [1], and that it increases by 1 when the provider's
  inventory is deleted [2].

  While these assumptions happen to be true today [3], they are not a
  documented part of the placement API.  Which either means we need to
  document this behavior; or clients should not be relying on it.

  [1] https://github.com/openstack/nova/blob/b214dfc41928d9e05199263301f8e5b23555c170/nova/scheduler/client/report.py#L552
  [2] https://github.com/openstack/nova/blob/b214dfc41928d9e05199263301f8e5b23555c170/nova/scheduler/client/report.py#L927
  [3] The latter more broadly stated as "increases by 1 when anything about the provider changes" - except we have a known hole for aggregates (see https://blueprints.launchpad.net/nova/+spec/placement-aggregate-generation)

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


References