Placement reporter service plugin sometimes creates orphaned resource providers

Bug #1818683 reported by Bence Romsics
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Bence Romsics

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.

Tags: qos
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/641034

Changed in neutron:
status: New → In Progress
tags: added: stein-rc-potential
Akihiro Motoki (amotoki)
Changed in neutron:
milestone: none → stein-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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 <email address hidden>
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 14.0.0.0rc1

This issue was fixed in the openstack/neutron 14.0.0.0rc1 release candidate.

tags: added: neutron-proactive-backport-potential
Revision history for this message
Bence Romsics (bence-romsics) wrote :

Hi Bernard,

I'm not sure if there's anything to backport here. This fix is already included in stable/stein, and the whole feature was non-existent in earlier versions.

Cheers,
Bence

tags: removed: neutron-proactive-backport-potential stein-rc-potential
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.