Bug 1297175

Summary: os-net-config misconfigured nic mapping
Product: Red Hat OpenStack Reporter: Asaf Hirshberg <ahirshbe>
Component: rhosp-directorAssignee: Hugh Brock <hbrock>
Status: CLOSED CURRENTRELEASE QA Contact: Shai Revivo <srevivo>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.0 (Kilo)CC: dsneddon, gfidente, jraju, mburns, nmorell, rhel-osp-director-maint, sclewis, skinjo
Target Milestone: ---   
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 21:32:37 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 Asaf Hirshberg 2016-01-10 08:30:39 UTC
Description of problem:
while deploying 7.2 environment with linux-bond following https://bugzilla.redhat.com/show_bug.cgi?id=1289825#c7 

one of the machine (controller-2) configured all nics under the bond1:
DEVICE=enp5s0f1
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
f0
# This file is autogenerated by os-net-config
DEVICE=enp5s0f0
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
cat: /etc/sysconfig/network-scripts/ifcfg: No such file or directory
f0oot@overcloud-controller-2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp4s0 
# This file is autogenerated by os-net-config
DEVICE=enp4s0f0
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
f1
# This file is autogenerated by os-net-config
DEVICE=enp4s0f1
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
MASTER=bond1
SLAVE=yes
BOOTPROTO=none

when only nic1 & nic2 should be part of bond1:
type: linux_bond
                  name: bond1
                  bonding_options: {get_param: BondInterfaceOvsOptions}
                  members:
                    -
                      type: interface
                      name: nic1
                      primary: true
                    -
                      type: interface
                      name: nic2
I could only access the controller via IPMI and have no ssh/scp access to attach the full log, thought to be relevant:

Jan 10 02:05:53 localhost os-collect-config: + os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
Jan 10 02:05:53 localhost dhclient[10040]: DHCPDISCOVER on enp4s0f1 to 255.255.255.255 port 67 interval 13 (xid=0x3b67660a)
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] Using config file at: /etc/os-net-config/config.json
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] Using mapping file at: /etc/os-net-config/mapping.yaml
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] Ifcfg net config provider created.
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] nic1 mapped to: enp4s0f0
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] nic2 mapped to: enp4s0f1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] nic3 mapped to: enp5s0f0
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] nic4 mapped to: enp5s0f1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding interface: enp5s0f0
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding bridge: br-ex
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding linux bond: bond1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding interface: enp4s0f0
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding interface: enp4s0f1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding vlan: vlan195
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding custom route for interface: vlan195
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding vlan: vlan189
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding vlan: vlan202
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding vlan: vlan203
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] adding vlan: vlan201
lying network configs...
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: bond1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: vlan201
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: vlan202
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: enp5s0f0
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: vlan195
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: vlan203
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: vlan189
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: enp4s0f0
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for interface: enp4s0f1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for bridge: br-ex
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] No changes required for linux bond: bond1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] running ifdown on interface: bond1
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] running ifdown on interface: enp4s0f0
Jan 10 02:05:53 localhost NetworkManager[787]: <info>  (enp4s0f0): device state change: ip-config -> deactivating (reason 'user-requested') [70 110 39]
Jan 10 02:05:53 localhost NetworkManager[787]: <info>  (enp4s0f0): device state change: deactivating -> disconnected (reason 'user-requested') [110 30 39]
Jan 10 02:05:53 localhost NetworkManager[787]: <info>  (enp4s0f0): canceled DHCP transaction, DHCP client pid 10043
Jan 10 02:05:53 localhost NetworkManager[787]: <info>  (enp4s0f0): DHCPv4 state changed unknown -> done
Jan 10 02:05:53 localhost dbus-daemon: dbus[768]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Jan 10 02:05:53 localhost dbus[768]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Jan 10 02:05:53 localhost os-collect-config: [2016/01/10 02:05:53 AM] [INFO] running ifdown on interface: enp4s0f1
Jan 10 02:05:53 localhost systemd: Starting Network Manager Script Dispatcher Service...
Jan 10 02:05:53 localhost dbus[768]: [system] Successfully activated service 'or:
....
....

Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] Using config file at: /etc/os-net-config/config.json
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] Using mapping file at: /etc/os-net-config/mapping.yaml
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] Ifcfg net config provider created.
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] nic1 mapped to: enp5s0f0
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] nic2 mapped to: enp5s0f1
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] adding interface: nic3
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] adding bridge: br-ex
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] adding linux bond: bond1
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] adding interface: enp5s0f0
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] adding interface: enp5s0f1
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] adding vlan: vlan195
Jan 10 02:07:03 localhost os-collect-config: [2016/01/10 02:07:03 AM] [INFO] add:

ifconfig:
bond1: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet6 fe80::461e:a1ff:fe73:3990  prefixlen 64  scopeid 0x20<link>
        ether 44:1e:a1:73:39:90  txqueuelen 0  (Ethernet)
        RX packets 12412  bytes 917336 (895.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 436  bytes 22384 (21.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ex: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::461e:a1ff:fe73:3990  prefixlen 64  scopeid 0x20<link>
        ether 44:1e:a1:73:39:90  txqueuelen 0  (Ethernet)
        RX packets 9821  bytes 619486 (604.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19  bytes 1594 (1.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0f0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        inet6 fe80::461e:a1ff:fe73:3990  prefixlen 64  scopeid 0x20<link>
        ether 44:1e:a1:73:39:90  txqueuelen 1000  (Ethernet)
        RX packets 1397  bytes 182195 (177.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 118  bytes 6544 (6.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0f1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        inet6 fe80::461e:a1ff:fe73:3990  prefixlen 64  scopeid 0x20<link>
        ether 44:1e:a1:73:39:90  txqueuelen 1000  (Ethernet)
        RX packets 49  bytes 15043 (14.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 113  bytes 6194 (6.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5s0f0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 44:1e:a1:73:39:90  txqueuelen 1000  (Ethernet)
        RX packets 5320  bytes 368845 (360.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 102  bytes 4824 (4.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xfbe60000-fbe7ffff  

enp5s0f1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 44:1e:a1:73:39:90  txqueuelen 1000  (Ethernet)
        RX packets 5646  bytes 351253 (343.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 103  bytes 4822 (4.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xfbee0000-fbefffff  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 148  bytes 13024 (12.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 148  bytes 13024 (12.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vlan189: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.12  netmask 255.255.255.0  broadcast 172.17.0.255
        inet6 fe80::7454:dff:feca:a680  prefixlen 64  scopeid 0x20<link>
        ether 76:54:0d:ca:a6:80  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 816 (816.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vlan195: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.35.180.11  netmask 255.255.255.0  broadcast 10.35.180.255
        inet6 fe80::7424:d2ff:fe25:7e8  prefixlen 64  scopeid 0x20<link>
        ether 76:24:d2:25:07:e8  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 345  bytes 14802 (14.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vlan201: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.0.10  netmask 255.255.255.0  broadcast 172.16.0.255
        inet6 fe80::bc2c:96ff:fe67:9ee2  prefixlen 64  scopeid 0x20<link>
        ether be:2c:96:67:9e:e2  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 816 (816.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vlan202: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.11  netmask 255.255.255.0  broadcast 172.18.0.255
        inet6 fe80::b8be:7eff:fe4f:cedc  prefixlen 64  scopeid 0x20<link>
        ether ba:be:7e:4f:ce:dc  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 816 (816.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vlan203: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.19.0.11  netmask 255.255.255.0  broadcast 172.19.0.255
        inet6 fe80::6c55:b1ff:fe4e:6d7a  prefixlen 64  scopeid 0x20<link>
        ether 6e:55:b1:4e:6d:7a  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 816 (816.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@overcloud-controller-2 ~]# 


versions: 
os-net-config-0.1.4-6.el7ost.noarch

Comment 6 Giulio Fidente 2016-01-29 10:50:56 UTC
hi, can you please attach the contents of:

 /etc/os-net-config

from one of the controller nodes?

Comment 8 Dan Sneddon 2016-01-29 15:41:59 UTC
It appears that the nic abstraction is not functioning as designed. We have seen this with certain combinations of motherboards and NICs.

If the NICs are the same across all nodes in a role, then you can use the real Ethernet NIC name instead of the abstraction (enp4s0f0 instead of nic1).

Comment 10 Mike Burns 2016-04-07 21:03:37 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 12 Dan Sneddon 2016-07-27 21:32:37 UTC
I believe this was addressed by a newer version of os-net-config that is available in OSP7.3 and later.