← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1818683] Re: Placement reporter service plugin sometimes creates orphaned resource providers

 

Reviewed:  https://review.openstack.org/641034
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=732dbdaf5e1ccf5a592131447927e66b9202e534
Submitter: Zuul
Branch:    master

commit 732dbdaf5e1ccf5a592131447927e66b9202e534
Author: Bence Romsics <bence.romsics@xxxxxxxxxxxx>
Date:   Tue Mar 5 15:43:19 2019 +0100

    Fail placement sync if _get_rp_by_name() fails
    
    The Placement sync process involves some input from Placement first.
    That is the UUID of the compute host RP. This is a remote call just like
    the Placement updates we send later and it also may fail in all the
    usual ways of remote calls. We need to fail the sync procedure if this
    remote call fails.
    
    Previously I had the mistaken belief that if I set the parent_uuid to
    None that will be an invalid call rejected by Placement. But no, that's
    a valid call and creates a resource provider without a parent. That is
    the neutron managed resource providers will be in their own resource
    provider tree instead of the compute host's resource provider tree.
    
    In this change we make sure to handle the failure of getting the compute
    host RP properly. We must not continue with the updates. And we must set
    the agent's resources_synced to False.
    
    Change-Id: Ie6ad33e2170c53a16c39a31a8d7f6496170a90ce
    Closes-Bug: #1818683


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1818683

Title:
  Placement reporter service plugin sometimes creates orphaned resource
  providers

Status in neutron:
  Fix Released

Bug description:
  As discovered by lajoskatona while working on a fullstack test
  (https://review.openstack.org/631793) the placement reporter plugin
  may create some of the neutron resource providers in the wrong
  resource provider tree. For example consider:

  $ openstack --os-placement-api-version 1.17 resource provider list
  +--------------------------------------+------------------------------------------+------------+--------------------------------------+--------------------------------------+
  | uuid                                 | name                                     | generation | root_provider_uuid                   | parent_provider_uuid                 |
  +--------------------------------------+------------------------------------------+------------+--------------------------------------+--------------------------------------+
  | 89ca1421-5117-5348-acab-6d0e2054239c | devstack0:Open vSwitch agent             |          0 | 89ca1421-5117-5348-acab-6d0e2054239c | None                                 |
  | 4a6f5f40-b7a1-5df4-9938-63983543f365 | devstack0:Open vSwitch agent:br-physnet0 |          2 | 89ca1421-5117-5348-acab-6d0e2054239c | 89ca1421-5117-5348-acab-6d0e2054239c |
  | 193134fd-464c-5545-9d20-df7d58c0166f | devstack0:Open vSwitch agent:br-ex       |          2 | 89ca1421-5117-5348-acab-6d0e2054239c | 89ca1421-5117-5348-acab-6d0e2054239c |
  | dbc498c7-8808-4f31-8abb-18560a4c3b53 | devstack0                                |          2 | dbc498c7-8808-4f31-8abb-18560a4c3b53 | None                                 |
  | 4a8a819d-61f9-5822-8c5c-3e9c7cb942d6 | devstack0:NIC Switch agent               |          0 | dbc498c7-8808-4f31-8abb-18560a4c3b53 | dbc498c7-8808-4f31-8abb-18560a4c3b53 |
  | 1c7e83f0-108d-5c35-ada7-7ebebbe43aad | devstack0:NIC Switch agent:ens5          |          2 | dbc498c7-8808-4f31-8abb-18560a4c3b53 | 4a8a819d-61f9-5822-8c5c-3e9c7cb942d6 |
  +--------------------------------------+------------------------------------------+------------+--------------------------------------+--------------------------------------+

  Please note that all RPs should have the root_provider_uuid set to the
  devstack0 RP's uuid, but the open vswitch RPs have a different (wrong)
  root. And 'devstack0:Open vSwitch agent' has no parent.

  This situation is dependent on service startup order. The ovs RPs were
  created before the compute host RP. That case should have been
  detected as an error, but it was not.

  I'll upload a proposed fix right away.

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


References