Bug 1693650 - [UPGRADE] Fail - Network - Plugin does not support updating provider attributes.
Summary: [UPGRADE] Fail - Network - Plugin does not support updating provider attribu...
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
Target Milestone: beta
: 15.0 (Stein)
Assignee: Harald Jensås
QA Contact: Candido Campos
Depends On: 1727807
TreeView+ depends on / blocked
Reported: 2019-03-28 12:12 UTC by Harald Jensås
Modified: 2020-10-26 12:25 UTC (History)
9 users (show)

Fixed In Version: openstack-neutron-14.0.2-0.20190619122701.3733721.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2019-09-21 11:21:05 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Launchpad 1822100 0 None None None 2019-03-28 15:33:53 UTC
OpenStack gerrit 648522 0 None MERGED Allow provider net attr in update if no change 2020-11-06 04:54:24 UTC
OpenStack gerrit 650599 0 None MERGED Fix a KeyError 2020-11-06 04:54:23 UTC
Red Hat Product Errata RHEA-2019:2811 0 None None None 2019-09-21 11:21:23 UTC

Description Harald Jensås 2019-03-28 12:12:00 UTC
Description of problem:
When upgrading from OSP-14 to OSP-15 the update fail's when Heat is updating the overcloud networks.

Stack Update:
2019-03-27 13:53:24Z [overcloud-Networks-ehyptffbrbzi-ExternalNetwork-w75ye2ofoyd2.ExternalNetwork]: UPDATE_FAILED  BadRequest: resources.Extern
alNetwork: Invalid input for operation: Plugin does not support updating provider attributes.

Neutron Server Log:
2019-03-27 13:28:00.184 20 DEBUG neutron.api.v2.base [req-aee208d0-e3e8-40b8-8316-0530bb512a77 dda66281282842eea51aa60e69ff4861 a2329f55cdb5439789f17a5ab226cb73 - default default] Request body: {'network': {'provider:physical_network': 'external', 'provider:network_type': 'flat', 'mtu': 1500}} prepare_request_body /usr/lib/python3.6/site-packages/neutron/api/v2/base.py:714

The data in ^^ request is what is places in 'value_spec' for the OS::Neutron::Net resource[1]:

  {'network': {'provider:physical_network': 'external', 'provider:network_type': 'flat', 'mtu': 1500}}

Since change[2] we added the 'mtu' value by doing a map_merge in heat.
          - {get_param: {{network.name}}NetValueSpecs}
          - {'mtu': {get_param: {{network.name}}Mtu}}

Neutron refuses any update of the provider attributes, despite the actual values did not change.
Heat does not do a deep compare of value_specs and consider the entrire property a diff, and passes the provider net attributes in the update.

It looks like Heat[3] does not support setting these provider net attributes outside of value_spec.

I can think of three possible ways to fix this:
 - Change neutron to filter the data from the request if the value did'nt actually change
   I.e {'provider:physical_network': 'external', 'provider:network_type': 'flat'} in the request is actually what is already set. So it's not an actual update of the attributes.
 - Change Heat to do a deep property diff on the 'value_spec' property, and filter any key/values that did'nt actaully change.
 - Add provider net properties, or mtu properties, on OS::Neutron::Net so that THT can set these "individually" without using 'value_spec'

[1] https://github.com/openstack/tripleo-heat-templates/blob/master/network/network.j2#L142-L144
[2] https://review.openstack.org/#/c/599593/21/network/network.j2
[3] https://github.com/openstack/heat/blob/master/heat/engine/resources/openstack/neutron/net.py#L33-L41

Comment 1 Harald Jensås 2019-03-28 15:36:03 UTC
Changed the component to openstack-neutron, and set DFG:Networking.
We had a little discussion and agree that this should be fixed in neutron. Upstream bug https://bugs.launchpad.net/neutron/+bug/1822100 opened for the issue.

Comment 2 Harald Jensås 2019-04-08 12:27:16 UTC
The original patch was rebased on top of some feature work.

A mistake was made, so we also need https://review.openstack.org/650599.

Comment 14 errata-xmlrpc 2019-09-21 11:21:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.