← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1697825] Re: nova-compute can not regist resource_provider when nova-compute start before placement endpoint created

 

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

commit c6b0d8ff5a80bf87f49124d8d9e4621d157c51e1
Author: Chris Dent <cdent@xxxxxxxxxxxxx>
Date:   Mon Aug 14 13:47:56 2017 +0100

    Reset client session when placement endpoint not found
    
    If the report client is able to access keystone to get a service
    catalog, but that catalog does not include a placement service (because
    it hasn't been added to the catalog yet), creating resource providers
    and other placement entities will fail. This is expected.
    
    What's not expected is that creating entities will continue to fail for
    quite some time, even if placement is added to the catalog. This is
    because the keystone session caches the service catalog for some amount
    of time.
    
    Therefore we need to create a new client session when EndpointNotFound
    happens. This has been added in this change by extracting creation of
    the report client's _client to its own method that we can call from the
    exception handler. The resource provider and aggregate maps are wiped at
    this time, to make sure we are starting from a clean slate. While this
    isn't likely to cause a problem in real life scenarios, in the manual
    testing I was doing it created issues.
    
    I've made the _client method synchronized so that in the unlikely event
    that the resource tracker is trying to do its update job while some
    other thing is happening, we won't waste the client. This may not be
    necessary, but probably doesn't harm anything.
    
    Change-Id: I02ac615dc26a4a0d1fd28a638f622777e41d14e4
    Co-Authored-By: zhangzhenzhong <zzzhang0118@xxxxxxxxx>
    Closes-Bug: #1697825


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

Title:
  nova-compute can not regist resource_provider when nova-compute start
  before placement endpoint created

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  1.When nova-compute start,bug placement's endpoint is not ready, it get the keystone session whitout placement's endpoint, cause nova-comuter regist resource_provider in nova_api failed.
  2.Then create placement's endpoint, but nova-compute can not regist resource_provider automatic because of the old keystone session. In this case, It must restart the nova-compute to regist the resource_provider

  I think the  keystone client session should be reload  when regist
  resource_provider failed.

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


References