neutron/neutron/services
Bence Romsics 11904b20ad 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)
(cherry picked from commit d3be39433c)
2021-05-10 06:26:36 +00:00
..
auto_allocate Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
conntrack_helper Bump pylint version to support python 3.8 2020-08-06 16:00:30 +02:00
externaldns designate: allow PTR zone creation to fail 2021-05-05 06:39:29 +00:00
flavors use api def ALIAS in supported_extension_aliases 2019-04-08 08:30:20 -06:00
l3_router trivial: Make driver_controller's _attrs_to_driver py3 compatible 2021-04-29 07:34:09 +00:00
logapi Update requirements for recent pip failures 2020-12-14 11:35:53 +01:00
loki use sqla functions from neutron-lib 2018-07-25 21:04:20 +00:00
metering Update requirements for recent pip failures 2020-12-14 11:35:53 +01:00
network_ip_availability use api def ALIAS in supported_extension_aliases 2019-04-08 08:30:20 -06:00
network_segment_range Remove "six" library 2020-07-28 16:55:52 +00:00
ovn_l3 Disable dns-integration API extension if it's not enabled in ML2 2021-01-13 15:30:05 +00:00
placement_report Physical NIC RP should be child of agent RP 2021-05-10 06:26:36 +00:00
portforwarding Fix incorrect exception catch when update floating ip port forwarding 2021-02-09 04:52:41 +00:00
qos Add minimum bw qos rule validation for network 2021-03-04 14:30:58 +00:00
rbac Neutron RBAC API and network support 2015-08-20 20:00:17 -07:00
revisions use api def ALIAS in supported_extension_aliases 2019-04-08 08:30:20 -06:00
segments Improve Network delete performance 2021-05-05 11:50:22 +04:00
tag Implement tagging during bulk port creation 2020-01-28 18:23:37 -06:00
timestamp remove the neutron.db._model_query module 2019-01-25 08:55:25 -07:00
trunk Fix update of trunk subports during live migration 2021-02-11 08:55:30 +00:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
provider_configuration.py Merge "Select service_provider on the basis of service_module" 2018-11-15 12:47:09 +00:00
service_base.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00