Bug 1868473 - single-nic-linux-bridge-vlans example network configs do not work
Summary: single-nic-linux-bridge-vlans example network configs do not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: z2
: 16.1 (Train on RHEL 8.2)
Assignee: RHOS Maint
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-12 19:03 UTC by Tom Bonds
Modified: 2020-10-28 15:39 UTC (History)
10 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20200914170155.29a02c1.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 15:39:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1866393 0 None None None 2020-09-03 20:11:05 UTC
OpenStack gerrit 714102 0 None MERGED Replace all the bridge_name variables in templates 2020-12-24 01:03:17 UTC
OpenStack gerrit 749822 0 None MERGED Replace all the bridge_name variables in templates 2020-12-24 01:02:43 UTC
Red Hat Product Errata RHEA-2020:4284 0 None None None 2020-10-28 15:39:30 UTC

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


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