vlan interface routes lost when parent bond interface is changed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-net-config |
In Progress
|
Undecided
|
Harald Jensås |
Bug Description
[root@os-net-config os-net-config]# ip r
default via 192.168.122.1 dev eth0 proto static metric 100
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.98 metric 100
[root@os-net-config os-net-config]# cat config.json
{
"network_
{
"name": "bond0",
"type": "linux_bond",
{
},
{
}
],
},
{
"type": "vlan",
},
{
"type": "vlan",
},
{
"type": "vlan",
],
}
]
}
[root@os-net-config os-net-config]# os-net-config -c /etc/os-
[2018/11/30 01:14:46 PM] [INFO] Using config file at: /etc/os-
[2018/11/30 01:14:46 PM] [INFO] Ifcfg net config provider created.
[2018/11/30 01:14:46 PM] [INFO] Not using any mapping file.
[2018/11/30 01:14:47 PM] [INFO] Finding active nics
[2018/11/30 01:14:47 PM] [INFO] vlan612 is not an active nic
[2018/11/30 01:14:47 PM] [INFO] vlan611 is not an active nic
[2018/11/30 01:14:47 PM] [INFO] vlan610 is not an active nic
[2018/11/30 01:14:47 PM] [INFO] bond0 is not an active nic
[2018/11/30 01:14:47 PM] [INFO] bonding_masters is not an active nic
[2018/11/30 01:14:47 PM] [INFO] eth1 is an embedded active nic
[2018/11/30 01:14:47 PM] [INFO] eth0 is an embedded active nic
[2018/11/30 01:14:47 PM] [INFO] eth2 is an embedded active nic
[2018/11/30 01:14:47 PM] [INFO] lo is not an active nic
[2018/11/30 01:14:47 PM] [INFO] No DPDK mapping available in path (/var/lib/
[2018/11/30 01:14:47 PM] [INFO] Active nics are ['eth0', 'eth1', 'eth2']
[2018/11/30 01:14:47 PM] [INFO] nic3 mapped to: eth2
[2018/11/30 01:14:47 PM] [INFO] nic2 mapped to: eth1
[2018/11/30 01:14:47 PM] [INFO] nic1 mapped to: eth0
[2018/11/30 01:14:47 PM] [INFO] adding linux bond: bond0
[2018/11/30 01:14:47 PM] [INFO] adding interface: eth1
[2018/11/30 01:14:47 PM] [INFO] adding interface: eth2
[2018/11/30 01:14:47 PM] [INFO] adding vlan: vlan610
[2018/11/30 01:14:47 PM] [INFO] adding custom route for interface: vlan610
[2018/11/30 01:14:47 PM] [INFO] adding vlan: vlan611
[2018/11/30 01:14:47 PM] [INFO] adding custom route for interface: vlan611
[2018/11/30 01:14:47 PM] [INFO] adding vlan: vlan612
[2018/11/30 01:14:47 PM] [INFO] adding custom route for interface: vlan612
[2018/11/30 01:14:47 PM] [INFO] applying network configs...
[2018/11/30 01:14:47 PM] [INFO] running ifdown on interface: vlan612
[2018/11/30 01:14:47 PM] [INFO] running ifdown on interface: vlan611
[2018/11/30 01:14:47 PM] [INFO] running ifdown on interface: vlan610
[2018/11/30 01:14:47 PM] [INFO] running ifdown on interface: eth2
[2018/11/30 01:14:47 PM] [INFO] running ifdown on interface: eth1
[2018/11/30 01:14:47 PM] [INFO] running ifdown on interface: bond0
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:14:47 PM] [INFO] running ifup on interface: eth2
[2018/11/30 01:14:47 PM] [INFO] running ifup on interface: eth1
[2018/11/30 01:14:47 PM] [INFO] running ifup on interface: bond0
[2018/11/30 01:14:47 PM] [INFO] running ifup on interface: vlan612
[2018/11/30 01:14:51 PM] [INFO] running ifup on interface: vlan611
[2018/11/30 01:14:55 PM] [INFO] running ifup on interface: vlan610
[root@os-net-config os-net-config]# ip r
default via 192.168.122.1 dev eth0 proto static metric 100
169.254.0.0/16 dev bond0 scope link metric 1005
169.254.0.0/16 dev vlan612 scope link metric 1006
169.254.0.0/16 dev vlan611 scope link metric 1007
169.254.0.0/16 dev vlan610 scope link metric 1008
172.20.1.0/26 dev vlan610 proto kernel scope link src 172.20.1.10
172.20.1.64/26 dev vlan611 proto kernel scope link src 172.20.1.70
172.20.1.128/26 dev vlan612 proto kernel scope link src 172.20.1.130
172.20.2.0/26 via 172.20.1.62 dev vlan610
172.20.2.64/26 via 172.20.1.126 dev vlan611
172.20.2.128/26 via 172.20.1.190 dev vlan612
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.98 metric 100
[root@os-net-config os-net-config]# sed -i s/miimon=
[root@os-net-config os-net-config]# os-net-config -c /etc/os-
[2018/11/30 01:15:53 PM] [INFO] Using config file at: /etc/os-
[2018/11/30 01:15:53 PM] [INFO] Ifcfg net config provider created.
[2018/11/30 01:15:53 PM] [INFO] Not using any mapping file.
[2018/11/30 01:15:53 PM] [INFO] Finding active nics
[2018/11/30 01:15:53 PM] [INFO] vlan612 is not an active nic
[2018/11/30 01:15:53 PM] [INFO] vlan611 is not an active nic
[2018/11/30 01:15:53 PM] [INFO] vlan610 is not an active nic
[2018/11/30 01:15:53 PM] [INFO] bond0 is not an active nic
[2018/11/30 01:15:53 PM] [INFO] bonding_masters is not an active nic
[2018/11/30 01:15:53 PM] [INFO] eth1 is an embedded active nic
[2018/11/30 01:15:53 PM] [INFO] eth0 is an embedded active nic
[2018/11/30 01:15:53 PM] [INFO] eth2 is an embedded active nic
[2018/11/30 01:15:53 PM] [INFO] lo is not an active nic
[2018/11/30 01:15:53 PM] [INFO] No DPDK mapping available in path (/var/lib/
[2018/11/30 01:15:53 PM] [INFO] Active nics are ['eth0', 'eth1', 'eth2']
[2018/11/30 01:15:53 PM] [INFO] nic3 mapped to: eth2
[2018/11/30 01:15:53 PM] [INFO] nic2 mapped to: eth1
[2018/11/30 01:15:53 PM] [INFO] nic1 mapped to: eth0
[2018/11/30 01:15:53 PM] [INFO] adding linux bond: bond0
[2018/11/30 01:15:53 PM] [INFO] adding interface: eth1
[2018/11/30 01:15:53 PM] [INFO] adding interface: eth2
[2018/11/30 01:15:53 PM] [INFO] adding vlan: vlan610
[2018/11/30 01:15:53 PM] [INFO] adding custom route for interface: vlan610
[2018/11/30 01:15:53 PM] [INFO] adding vlan: vlan611
[2018/11/30 01:15:53 PM] [INFO] adding custom route for interface: vlan611
[2018/11/30 01:15:53 PM] [INFO] adding vlan: vlan612
[2018/11/30 01:15:53 PM] [INFO] adding custom route for interface: vlan612
[2018/11/30 01:15:53 PM] [INFO] applying network configs...
[2018/11/30 01:15:53 PM] [INFO] No changes required for interface: eth2
[2018/11/30 01:15:53 PM] [INFO] No changes required for interface: eth1
[2018/11/30 01:15:53 PM] [INFO] No changes required for vlan interface: vlan612
[2018/11/30 01:15:53 PM] [INFO] No changes required for vlan interface: vlan611
[2018/11/30 01:15:53 PM] [INFO] No changes required for vlan interface: vlan610
[2018/11/30 01:15:53 PM] [INFO] running ifdown on interface: eth2
[2018/11/30 01:15:54 PM] [INFO] running ifdown on interface: eth1
[2018/11/30 01:15:54 PM] [INFO] running ifdown on interface: bond0
[2018/11/30 01:15:54 PM] [INFO] Writing config /etc/sysconfig/
[2018/11/30 01:15:54 PM] [INFO] running ifup on interface: eth2
[2018/11/30 01:15:54 PM] [INFO] running ifup on interface: eth1
[2018/11/30 01:15:54 PM] [INFO] running ifup on interface: bond0
[root@os-net-config os-net-config]# ip r
default via 192.168.122.1 dev eth0 proto static metric 100
169.254.0.0/16 dev bond0 scope link metric 1005
172.20.1.0/26 dev vlan610 proto kernel scope link src 172.20.1.10
172.20.1.64/26 dev vlan611 proto kernel scope link src 172.20.1.70
172.20.1.128/26 dev vlan612 proto kernel scope link src 172.20.1.130
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.98 metric 100
The following routes are no longer present:
172.20.2.0/26 via 172.20.1.62 dev vlan610
172.20.2.64/26 via 172.20.1.126 dev vlan611
172.20.2.128/26 via 172.20.1.190 dev vlan612
The routes are in the configuration files:
[root@os-net-config os-net-config]# cat /etc/sysconfig/
172.20.2.0/26 via 172.20.1.62 dev vlan610
172.20.2.64/26 via 172.20.1.126 dev vlan611
172.20.2.128/26 via 172.20.1.190 dev vlan612
Bringing the vlan interfaces down and up again adds the routes:
172.20.2.0/26 via 172.20.1.62 dev vlan610
172.20.2.64/26 via 172.20.1.126 dev vlan611
172.20.2.128/26 via 172.20.1.190 dev vlan612
Changed in os-net-config: | |
status: | New → In Progress |
assignee: | nobody → Harald Jensås (harald-jensas) |
Proposed fix: https:/ /review. openstack. org/621298
Test result in reproducer: ------- ------- -----
-------
[root@os-net-config ~]# cat /etc/os- net-config/ config. json config" : [
"use_ dhcp": false,
"bonding_ options" : "mode=1 miimon=111",
"members" : [
" type": "interface",
" name": "nic2",
" primary" : true
" type": "interface",
" name": "nic3"
"device" : "bond0",
"vlan_ id": 610,
"addresses ": [{"ip_netmask": "172.20.1.10/26"}],
"routes" : [{"ip_netmask": "172.20.2.0/26", "next_hop": "172.20.1.62"}],
"device" : "bond0",
"vlan_ id": 611,
"addresses ": [{"ip_netmask": "172.20.1.70/26"}],
"routes" : [{"ip_netmask": "172.20.2.64/26", "next_hop": "172.20.1.126"}],
"device" : "bond0",
"vlan_ id": 612,
"dns_ servers" : [
"192. 168.122. 1"
"addresses ": [{"ip_netmask": "172.20. 1.130/26" }],
"routes" : [{"ip_netmask": "172.20.2.128/26", "next_hop": "172.20.1.190"}],
{
"network_
{
"name": "bond0",
"type": "linux_bond",
{
},
{
}
],
},
{
"type": "vlan",
},
{
"type": "vlan",
},
{
"type": "vlan",
],
}
]
}
Initial configuration apply: ------- ------- -------
-------
[root@os-net-config ~]# os-net-config -c os-net-config -c /etc/os- net-config/ config. json -v net-config/ config. json os-net- config/ dpdk_mapping. yaml)
[2018/12/01 07:56:26 PM] [INFO] Using config file at: /etc/os-
[2018/12/01 07:56:26 PM] [INFO] Ifcfg net config provider created.
[2018/12/01 07:56:26 PM] [INFO] Not using any mapping file.
[2018/12/01 07:56:26 PM] [INFO] Finding active nics
[2018/12/01 07:56:26 PM] [INFO] lo is not an active nic
[2018/12/01 07:56:26 PM] [INFO] eth2 is an embedded active nic
[2018/12/01 07:56:26 PM] [INFO] eth0 is an embedded active nic
[2018/12/01 07:56:26 PM] [INFO] eth1 is an embedded active nic
[2018/12/01 07:56:26 PM] [INFO] No DPDK mapping available in path (/var/lib/
[2018/12/01 07:56:26 PM] [INFO] Active nics are ['eth0', 'eth1', 'eth2']
[2018/12/01 07:56:26 PM] [INFO] nic3 mapped to: eth2
[2018/12/01 07:56:26 PM] [INFO] nic2 mapped to: eth1
[2018/12/01 07:56:26 PM] [INFO] nic1 mapped to: eth0
[2018/12/01 07:56:26 PM] [INFO] adding linux bond: bond0
[2018/12/01 07:56:26 PM] [INFO] adding interface: eth1
[2018/12/01 07:56:26 PM] [INFO] adding interface: eth2
[2018/12/01 07:56:26 PM] [INFO] adding vlan: vlan610
[2018/12/01 07:56:26 PM] [INFO] adding custom route for interface: vlan610
[2018/12/01 07:56:26 PM] [INFO] adding vlan: vlan611
[2018/12/01 07:56:26 PM] [INFO] adding custom route for interface: vlan611
[2018/12/01 07:56:26 PM] [INFO] adding vlan: vlan612
[2018/12/01 07:56:26 PM] [INFO] adding custom route for interface: vlan612
[2018/12/01 07:56:26 PM] [INFO] applying network configs...
[2018/12/01 07:56:26 PM] [INFO] running ifdown on interface: vlan612
[2018/...