Bug 1868473

Summary: single-nic-linux-bridge-vlans example network configs do not work
Product: Red Hat OpenStack Reporter: Tom Bonds <tbonds>
Component: openstack-tripleo-heat-templatesAssignee: RHOS Maint <rhos-maint>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: high Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: aschultz, atonner, bfournie, dsneddon, hbrock, hjensas, jslagle, mburns, mgalayda, pweeks
Target Milestone: z2Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20200914170155.29a02c1.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-28 15:39:08 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:

Description Tom Bonds 2020-08-12 19:03:44 UTC
Description of problem:

The rendered single-nic-linux-bridge-vlans network configs do not work due to bridge_name replacement only affecting first match in /etc/os-net-config/config.json


Version-Release number of selected component (if applicable):

openstack-tripleo-heat-templates-11.3.2-0.20200616081532


How reproducible:

always


Steps to Reproduce:

1. run process-templates.py
2. use configs from network/config/single-nic-linux-bridge-vlans/
3. deploy overcloud

Actual results:

devices in config.json use "device:" "bridge_name" instead of "device:" "br-ex"

{"network_config": [{"name": "eno1", "type": "interface", "use_dhcp": false}, {"name": "eno2", "type": "interface", "use_dhcp": false}, {"name": "eno3", "type": "interface", "use_dhcp": false}, {"name": "eno4", "type": "interface", "use_dhcp": false}, {"addresses": [{"ip_netmask": "10.255.0.7/24"}], "dns_servers": ["10.31.20.13", "10.242.67.11", "10.247.139.253"], "domain": ["example.com"], "members": [{"bonding_options": "miimon=100 mode=4 xmit_hash_policy=layer3+4", "members": [{"mtu": 9000, "name": "enp6s0f0", "primary": true, "type": "interface"}, {"mtu": 9000, "name": "enp6s0f1", "type": "interface"}], "mtu": 9000, "name": "bond1", "type": "linux_bond"}, {"addresses": [{"ip_netmask": "10.255.2.7/24"}], "device": "br-ex", "mtu": 9000, "routes": [], "type": "vlan", "vlan_id": 2478}, {"addresses": [{"ip_netmask": "172.18.0.7/23"}], "device": "bridge_name", "mtu": 1500, "routes": [], "type": "vlan", "vlan_id": 2472}, {"addresses": [{"ip_netmask": "172.18.4.7/23"}], "device": "bridge_name", "mtu": 9000, "routes": [], "type": "vlan", "vlan_id": 2473}, {"addresses": [{"ip_netmask": "10.247.152.7/27"}], "device": "bridge_name", "mtu": 1500, "routes": [], "type": "vlan", "vlan_id": 2471}], "name": "bridge_name", "routes": [{"default": true, "next_hop": "10.255.0.1"}], "type": "linux_bridge", "use_dhcp": false}]}


Expected results:

devices use "device:" "br-ex" (or whatever NeutronPhysicalBridge is)

{"network_config": [{"name": "eno1", "type": "interface", "use_dhcp": false}, {"name": "eno2", "type": "interface", "use_dhcp": false}, {"name": "eno3", "type": "interface", "use_dhcp": false}, {"name": "eno4", "type": "interface", "use_dhcp": false}, {"addresses": [{"ip_netmask": "10.255.0.7/24"}], "dns_servers": ["10.31.20.13", "10.242.67.11", "10.247.139.253"], "domain": ["example.com"], "members": [{"bonding_options": "miimon=100 mode=4 xmit_hash_policy=layer3+4", "members": [{"mtu": 9000, "name": "enp6s0f0", "primary": true, "type": "interface"}, {"mtu": 9000, "name": "enp6s0f1", "type": "interface"}], "mtu": 9000, "name": "bond1", "type": "linux_bond"}, {"addresses": [{"ip_netmask": "10.255.2.7/24"}], "device": "br-ex", "mtu": 9000, "routes": [], "type": "vlan", "vlan_id": 2478}, {"addresses": [{"ip_netmask": "172.18.0.7/23"}], "device": "br-ex", "mtu": 1500, "routes": [], "type": "vlan", "vlan_id": 2472}, {"addresses": [{"ip_netmask": "172.18.4.7/23"}], "device": "br-ex", "mtu": 9000, "routes": [], "type": "vlan", "vlan_id": 2473}, {"addresses": [{"ip_netmask": "10.247.152.7/27"}], "device": "br-ex", "mtu": 1500, "routes": [], "type": "vlan", "vlan_id": 2471}], "name": "br-ex", "routes": [{"default": true, "next_hop": "10.255.0.1"}], "type": "linux_bridge", "use_dhcp": false}]}

Additional info:

Issue is due to sed run-os-net-config.sh only replacing first match in line:

sed -i "s/: \"bridge_name/: \"${bridge_name:-''}/" /etc/os-net-config/config.json

adding 'g' to the substitute resolves this issue.

Comment 6 Alistair Tonner 2020-10-19 18:18:14 UTC
core_puddle_version: RHOS-16.1-RHEL-8-20201007.n.0
openstack-tripleo-heat-templates.noarch           11.3.2-1.20200914170156.el8ost                  @rhelosp-16.1

test against modified template updated all bridge elements in the result.

Comment 10 errata-xmlrpc 2020-10-28 15:39:08 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 (Red Hat OpenStack Platform 16.1 bug fix and enhancement 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-2020:4284