neutron/tools
Bence Romsics d3be39433c Physical NIC RP should be child of agent RP
In the fix for #1853840 I made a mistake and since then we created
the physical NIC resource providers as a child of the hypervisor
resource provider instead of the agent resource provider. Here:

https://review.opendev.org/c/openstack/neutron/+/696600/3/neutron/agent/common/placement_report.py#159

This *did not* break the minimum bandwidth aware scheduling.
But still there are multiple problems:

1) If you created your physical NIC RPs before the fix for #1853840
   but upgraded to after the fix for #1853840, then resource syncs
   will throw an error in neutron-server at each physical NIC RP
   update. That pollutes the logs and wastes some resources since
   the prohibited update will be forever retried.

2) If you created your physical NIC RPs after the fix for #1853840
   then your physical NIC RPs have the wrong parent. Which again
   does not break minimum bandwidth aware scheduling. But it may pose
   problems for later features wanting to build on the originally
   planned RP tree structure.

3) Cleanup of decommissioned RPs is a bit different than expected.
   This cleanup was always left to the admin, so it only affects a
   manual process.

The proper RP structure was and should be the following:

The hypervisor RP(s) must be the root(s).
As a child of each hypervisor RP, there should be an agent RP.
The physical NIC RPs should be the children of the agent RPs.

Unfortunately at the moment the Placement API generically prohibits
update of the parent resource provider id in a PUT request:

https://docs.openstack.org/api-ref/placement/?expanded=update-resource-provider-detail#update-resource-provider

Therefore without a later Placement change we cannot fix the RPs
already created with the wrong parent. However we can fix the RPs
to be created later. We do that here. We also fix a bug in the unit
tests that allowed the wrong parent to pass unnoticed. Plus we
add an extra log message to direct the user seeing the pollution
in the logs to the proper bug report.

There may be a follow up patch later, because not all RP re-parenting
operations are problematic, therefore we are thinking of relaxing
this blanket prohibition in Placement. When Placement allows updates
to the parent id we can fix RPs already created with the wrong parent
too.

Change-Id: I7caa8827d22103600ca685a58294640fc831dbd9
Closes-Bug: #1921150
Co-Authored-By: "Balazs Gibizer" <balazs.gibizer@est.tech>
Related-Bug: #1853840
(cherry picked from commit 7f35e4e857)
2021-05-05 08:09:36 +00:00
..
ovn_migration Merge "ovn-migration: Use DHCP nodes to configure dnsmasq" 2021-03-24 14:29:31 +00:00
tripleo Merge networking-ovn documentation into neutron 2020-02-13 18:54:15 +09:00
abandon_old_reviews.sh Make abandon_old_reviews script to be compatible with python 3 2020-09-25 18:34:09 +02:00
bug-1921150-re-parent-device-rps.sql Physical NIC RP should be child of agent RP 2021-05-05 08:09:36 +00:00
check_unit_test_structure.sh Fix bashate warnings 2017-03-07 13:32:04 -05:00
coding-checks.sh Add bashate support 2017-02-25 06:29:55 +00:00
configure_for_func_testing.sh Merge "Force ncat install for functional/fullstack jobs" 2020-09-07 11:01:26 +00:00
deploy_rootwrap.sh Set an absolute path in rootwrap filters_path 2020-02-13 17:10:53 +00:00
download_gerrit_change.py [OVN] scripts for networking-ovn code migration 2020-01-26 20:19:43 +00:00
files_in_patch.py [OVN] scripts for networking-ovn code migration 2020-01-26 20:19:43 +00:00
generate_config_file_samples.sh Remove unnecessary 'set -x' at EOL in genconfig script 2018-12-13 13:28:57 +00:00
generate_dhclient_script_for_fullstack.sh fullstack: Don't let dhcp agents failover 2017-04-20 14:04:50 +00:00
install_venv.py Stop to use the __future__ module. 2020-06-04 08:34:47 +00:00
install_venv_common.py Stop to use the __future__ module. 2020-06-04 08:34:47 +00:00
list_moved_globals.py Stop to use the __future__ module. 2020-06-04 08:34:47 +00:00
migrate_names.py [OVN] scripts for networking-ovn code migration 2020-01-26 20:19:43 +00:00
migrate_names.txt [OVN] Updates to tools/migrate_names.txt 2020-12-14 16:44:40 -05:00
misc-sanity-checks.sh Convert policy.json into policy-in-code 2018-12-13 20:37:53 +00:00
pip_install_src_modules.sh Updates for python3.8 2020-04-28 14:03:21 -04:00
requirements.txt [OVN] scripts for networking-ovn code migration 2020-01-26 20:19:43 +00:00
split.sh Replace git.openstack.org URLs with opendev.org URLs 2019-04-23 10:00:45 +08:00
unassign_bug.py Add launchpad bug update support to abandon script 2017-04-16 02:44:03 -07:00
with_venv.sh Use tools_path/venv environment variables in install_venv 2016-01-20 02:07:12 +00:00