Using net-bond-with-vlans.yaml results in broken os-net-config config.yaml

Bug #1901111 reported by Kevin Jones
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
tripleo
Triaged
High
Unassigned

Bug Description

Description
===========
When using net-bond-with-vlans.yaml, the /etc/os-net-config/config.yaml that is generated removes the trailing newline in the loop of vlans (See example below).

You'll notice that each iteration of the vlan loop leaves the routes line as:
routes: [] - type: vlan

This causes deployment failures because the config.yaml file is invalid.

I believe the issue is in the tripleo-ansible/tripleo_network_config role in the bond_vlans.j2 template (as well as some of the others that I looked through).

This file has the loop end with:
{%- endfor %}

I believe the minus sign is the issue. Some of the j2 templates for tripleo_network_config have this minus sign, some do not.

Steps to reproduce
==================
1. Preprovision servers with only ctlplane network configured
2. Attempt overcloud deployment on pre-provisioned servers using net-bond-with-vlans.yaml passed as env file
3. Observe failure of deployment on os-net-config execution

Expected result
===============
os-net-config config.json has - type: vlan on seperate line and os-net-config is able to complete without error

Actual result
=============
Deployment fails because os-net-config/config.yaml is invalid

Environment
===========
RDO Victoria
Ceph Nautilus
Neutron OVN DVR HA

Additional Info
===========

Example broken config.yaml:

[heat-admin@overcloud-controller-0 ~]$ sudo cat /etc/os-net-config/config.yaml
---
network_config:
- type: ovs_bridge
  name: br-ex
  dns_servers: ['10.99.99.12']
  domain: ['kdjlab.com']
  use_dhcp: false
  addresses:
  - ip_netmask: 10.100.4.84/24
  routes: []
  members:
  - type: ovs_bond
    name: bond1
    mtu: 1500
    ovs_options: bond_mode=balance-slb
    members:
    - type: interface
      name: nic1
      mtu: 1500
      primary: true
    - type: interface
      name: nic2
      mtu: 1500
  - type: vlan
    mtu: 1500
    vlan_id: 1107
    addresses:
    - ip_netmask: 10.100.7.164/24
    routes: [] - type: vlan
    mtu: 1500
    vlan_id: 1108
    addresses:
    - ip_netmask: 10.100.8.168/24
    routes: [] - type: vlan
    mtu: 1500
    vlan_id: 1105
    addresses:
    - ip_netmask: 10.100.5.158/24
    routes: [] - type: vlan
    mtu: 1500
    vlan_id: 1106
    addresses:
    - ip_netmask: 10.100.6.169/24
    routes: [] - type: vlan
    mtu: 1500
    vlan_id: 2100
    addresses:
    - ip_netmask: 192.168.100.41/24
    routes: [{'default': True, 'next_hop': '192.168.100.1'}]

Revision history for this message
Kevin Jones (kevindjones) wrote :

After running with the minus removed from the end loop line, below is the resulting (valid) config.yaml.

[heat-admin@overcloud-controller-0 ~]$ sudo cat /etc/os-net-config/config.yaml
---
network_config:
- type: ovs_bridge
  name: br-ex
  dns_servers: ['10.99.99.12']
  domain: ['kdjlab.com']
  use_dhcp: false
  addresses:
  - ip_netmask: 10.100.4.84/24
  routes: []
  members:
  - type: ovs_bond
    name: bond1
    mtu: 1500
    ovs_options: bond_mode=balance-slb
    members:
    - type: interface
      name: nic1
      mtu: 1500
      primary: true
    - type: interface
      name: nic2
      mtu: 1500
  - type: vlan
    mtu: 1500
    vlan_id: 1107
    addresses:
    - ip_netmask: 10.100.7.169/24
    routes: []
  - type: vlan
    mtu: 1500
    vlan_id: 1108
    addresses:
    - ip_netmask: 10.100.8.150/24
    routes: []
  - type: vlan
    mtu: 1500
    vlan_id: 1105
    addresses:
    - ip_netmask: 10.100.5.163/24
    routes: []
  - type: vlan
    mtu: 1500
    vlan_id: 1106
    addresses:
    - ip_netmask: 10.100.6.167/24
    routes: []
  - type: vlan
    mtu: 1500
    vlan_id: 2100
    addresses:
    - ip_netmask: 192.168.100.48/24
    routes: [{'default': True, 'next_hop': '192.168.100.1'}]

Changed in tripleo:
status: New → Triaged
importance: Undecided → High
milestone: none → victoria-3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.