Bug 1693650

Summary: [UPGRADE] Fail - Network - Plugin does not support updating provider attributes.
Product: Red Hat OpenStack Reporter: Harald Jensås <hjensas>
Component: openstack-neutronAssignee: Harald Jensås <hjensas>
Status: CLOSED ERRATA QA Contact: Candido Campos <ccamposr>
Severity: high Docs Contact:
Priority: high    
Version: 15.0 (Stein)CC: amuller, chrisw, ekuris, jfrancoa, jstransk, ldenny, mburns, njohnston, scohen
Target Milestone: betaKeywords: Triaged
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-14.0.2-0.20190619122701.3733721.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:21:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1727807    
Bug Blocks:    

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.
      value_specs:
        map_merge:
          - {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.

https://access.redhat.com/errata/RHEA-2019:2811