Bug 1655765

Summary: os-net-config don't restart vlan when a change append on bond (OSP-13)
Product: Red Hat OpenStack Reporter: Bob Fournier <bfournie>
Component: os-net-configAssignee: Harald Jensås <hjensas>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: high Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: bfournie, cylopez, hbrock, hjensas, jslagle, mariel, mburns, racedoro, sasha
Target Milestone: z4Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: os-net-config-8.4.3-3.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1654987
: 1656074 (view as bug list) Environment:
Last Closed: 2019-01-16 17:55:29 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: 1654987    
Bug Blocks: 1656074    

Comment 10 Alexander Chuzhoy 2019-01-07 18:39:59 UTC
Verified:
Environment: os-net-config-8.4.3-3.el7ost.noarch


Configured the config.json to look as below (note the route under vlan20):
[root@controller-1 ~]# cat /etc/os-net-config/config.json_new                                                                                                                                 
{                                                                                                                                                                                             
    "network_config": [                                                                                                                                                                       
        {
            "addresses": [
                {
                    "ip_netmask": "192.168.24.6/24"
                }
            ],
            "dns_servers": [
                "10.0.0.1"
            ],
            "members": [
                {
                    "name": "nic1",
                    "primary": true,
                    "type": "interface"
                }
            ],
            "name": "br-baremetal",
            "routes": [
                {
                    "default": true,
                    "ip_netmask": "0.0.0.0/0",
                    "next_hop": "192.168.24.1"
                },
                {
                    "ip_netmask": "169.254.169.254/32",
                    "next_hop": "192.168.24.1"
                },
                {
                    "ip_netmask": "172.250.250.0/24",
                    "next_hop": "192.168.24.1"
                }
            ],
            "type": "ovs_bridge",
            "use_dhcp": false
        },
        {
            "members": [
                {
                    "name": "nic2",
                    "primary": true,
                    "type": "interface"
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.1.12/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 20,
                    "routes": [
                        {
                            "ip_netmask": "172.20.1.0/24",
                            "next_hop": "172.17.1.1"
                        }
                    ]
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.3.19/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 30
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.4.11/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 40
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.2.21/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 50
                }
            ],
            "name": "br-isolated",
            "type": "ovs_bridge",
            "use_dhcp": false
        },
        {
            "addresses": [
                {
                    "ip_netmask": "10.0.0.105/24"
                }
            ],
            "members": [
                {
                    "name": "nic3",
                    "primary": true,
                    "type": "interface"
                }
            ],
            "name": "br-ex",
            "routes": [
                {
                    "ip_netmask": "0.0.0.0/0",
                    "next_hop": "10.0.0.1"
                }
            ],
            "type": "ovs_bridge",
            "use_dhcp": false
        }
    ]
}


Applied the above config and saw route added to vlan


Then change the config.json per below (note the ovs_extra under br-isolated):
[root@controller-1 ~]# cat /etc/os-net-config/config.json_new                                                                                                                                 
{                                                                                                                                                                                             
    "network_config": [                                                                                                                                                                       
        {
            "addresses": [
                {
                    "ip_netmask": "192.168.24.6/24"
                }
            ],
            "dns_servers": [
                "10.0.0.1"
            ],
            "members": [
                {
                    "name": "nic1",
                    "primary": true,
                    "type": "interface"
                }
            ],
            "name": "br-baremetal",
            "routes": [
                {
                    "default": true,
                    "ip_netmask": "0.0.0.0/0",
                    "next_hop": "192.168.24.1"
                },
                {
                    "ip_netmask": "169.254.169.254/32",
                    "next_hop": "192.168.24.1"
                },
                {
                    "ip_netmask": "172.250.250.0/24",
                    "next_hop": "192.168.24.1"
                }
            ],
            "type": "ovs_bridge",
            "use_dhcp": false
        },
        {
            "members": [
                {
                    "name": "nic2",
                    "primary": true,
                    "type": "interface"
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.1.12/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 20,
                    "routes": [
                        {
                            "ip_netmask": "172.20.1.0/24",
                            "next_hop": "172.17.1.1"
                        }
                    ]
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.3.19/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 30
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.4.11/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 40
                },
                {
                    "addresses": [
                        {
                            "ip_netmask": "172.17.2.21/24"
                        }
                    ],
                    "type": "vlan",
                    "vlan_id": 50
                }
            ],
            "name": "br-isolated",
            "type": "ovs_bridge",
            "ovs_extra": [
              "list-ifaces {name}"
            ],
            "use_dhcp": false
        },
        {
            "addresses": [
                {
                    "ip_netmask": "10.0.0.105/24"
                }
            ],
            "members": [
                {
                    "name": "nic3",
                    "primary": true,
                    "type": "interface"
                }
            ],
            "name": "br-ex",
            "routes": [
                {
                    "ip_netmask": "0.0.0.0/0",
                    "next_hop": "10.0.0.1"
                }
            ],
            "type": "ovs_bridge",
            "use_dhcp": false
        }
    ]
}



Applying the config restarts the bridge and brings down and up the vlans. The configuration on vlans remains.

[root@controller-1 ~]# os-net-config -v -c /etc/os-net-config/config.json                                                                                                            [36/1741]
[2019/01/07 06:28:01 PM] [INFO] Using config file at: /etc/os-net-config/config.json
[2019/01/07 06:28:01 PM] [INFO] Ifcfg net config provider created.
[2019/01/07 06:28:01 PM] [INFO] Not using any mapping file.
[2019/01/07 06:28:02 PM] [INFO] Finding active nics
[2019/01/07 06:28:02 PM] [INFO] br-int is not an active nic
[2019/01/07 06:28:02 PM] [INFO] br-tun is not an active nic
[2019/01/07 06:28:02 PM] [INFO] ovs-system is not an active nic
[2019/01/07 06:28:02 PM] [INFO] br-baremetal is not an active nic
[2019/01/07 06:28:02 PM] [INFO] eth2 is an embedded active nic
[2019/01/07 06:28:02 PM] [INFO] eth1 is an embedded active nic
[2019/01/07 06:28:02 PM] [INFO] eth0 is an embedded active nic
[2019/01/07 06:28:02 PM] [INFO] lo is not an active nic
[2019/01/07 06:28:02 PM] [INFO] docker0 is not an active nic
[2019/01/07 06:28:02 PM] [INFO] br-ex is not an active nic
[2019/01/07 06:28:02 PM] [INFO] vxlan_sys_4789 is not an active nic
[2019/01/07 06:28:02 PM] [INFO] No DPDK mapping available in path (/var/lib/os-net-config/dpdk_mapping.yaml)
[2019/01/07 06:28:02 PM] [INFO] Active nics are ['eth0', 'eth1', 'eth2']
[2019/01/07 06:28:02 PM] [INFO] nic3 mapped to: eth2
[2019/01/07 06:28:02 PM] [INFO] nic2 mapped to: eth1
[2019/01/07 06:28:02 PM] [INFO] nic1 mapped to: eth0
[2019/01/07 06:28:02 PM] [INFO] adding bridge: br-baremetal
[2019/01/07 06:28:02 PM] [INFO] adding custom route for interface: br-baremetal
[2019/01/07 06:28:02 PM] [INFO] adding interface: eth0
[2019/01/07 06:28:02 PM] [INFO] adding bridge: br-isolated
[2019/01/07 06:28:02 PM] [INFO] adding interface: eth1
[2019/01/07 06:28:02 PM] [INFO] adding vlan: vlan20
[2019/01/07 06:28:02 PM] [INFO] adding custom route for interface: vlan20
[2019/01/07 06:28:02 PM] [INFO] adding vlan: vlan30
[2019/01/07 06:28:02 PM] [INFO] adding vlan: vlan40
[2019/01/07 06:28:02 PM] [INFO] adding vlan: vlan50
[2019/01/07 06:28:02 PM] [INFO] adding bridge: br-ex
[2019/01/07 06:28:02 PM] [INFO] adding custom route for interface: br-ex
[2019/01/07 06:28:02 PM] [INFO] adding interface: eth2
[2019/01/07 06:28:02 PM] [INFO] applying network configs...
[2019/01/07 06:28:02 PM] [INFO] No changes required for interface: eth2
[2019/01/07 06:28:02 PM] [INFO] No changes required for interface: eth1
[2019/01/07 06:28:02 PM] [INFO] No changes required for interface: eth0
[2019/01/07 06:28:02 PM] [INFO] No changes required for bridge: br-baremetal
[2019/01/07 06:28:02 PM] [INFO] No changes required for bridge: br-ex
[2019/01/07 06:28:02 PM] [INFO] No changes required for vlan interface: vlan20
[2019/01/07 06:28:02 PM] [INFO] No changes required for vlan interface: vlan30
[2019/01/07 06:28:02 PM] [INFO] No changes required for vlan interface: vlan40
[2019/01/07 06:28:02 PM] [INFO] No changes required for vlan interface: vlan50
[2019/01/07 06:28:02 PM] [INFO] running ifdown on interface: vlan50
[2019/01/07 06:28:02 PM] [INFO] running ifdown on interface: vlan20
[2019/01/07 06:28:02 PM] [INFO] running ifdown on interface: vlan30
[2019/01/07 06:28:02 PM] [INFO] running ifdown on interface: vlan40
[2019/01/07 06:28:02 PM] [INFO] running ifdown on interface: eth1
[2019/01/07 06:28:02 PM] [INFO] running ifdown on bridge: br-isolated
[2019/01/07 06:28:03 PM] [INFO] Writing config /etc/sysconfig/network-scripts/route-br-isolated
[2019/01/07 06:28:03 PM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-br-isolated
[2019/01/07 06:28:03 PM] [INFO] Writing config /etc/sysconfig/network-scripts/route6-br-isolated
[2019/01/07 06:28:03 PM] [INFO] running ifup on bridge: br-isolated
[2019/01/07 06:28:03 PM] [INFO] running ifup on interface: vlan50
[2019/01/07 06:28:07 PM] [INFO] running ifup on interface: vlan20
[2019/01/07 06:28:11 PM] [INFO] running ifup on interface: vlan30
[2019/01/07 06:28:16 PM] [INFO] running ifup on interface: vlan40
[2019/01/07 06:28:20 PM] [INFO] running ifup on interface: eth1
[root@controller-1 ~]#

Comment 12 errata-xmlrpc 2019-01-16 17:55:29 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/RHBA-2019:0068