Description of problem: vdsm should handle ifcfg files that have PHYSDEV= instead DEVICE= for vlan connections created with nmcli. - As part of the fix for BZ 1367378 vdsm should be able to handle all ifcfg files that created by NM. When creating vlan device using nmcli, for example -> [root@orchid-vds2 ~]# nmcli connection show NAME UUID TYPE DEVICE System enp4s0 7bea4bfb-6e6d-447f-8475-fe413f05f520 802-3-ethernet enp4s0 [root@orchid-vds2 ~]# nmcli con add type vlan con-name enp4s0.162-1 dev enp4s0 id 162; \ > nmcli con mod uuid 7bea4bfb-6e6d-447f-8475-fe413f05f520 ipv4.method disabled ipv6.method ignore; \ > nmcli con mod id enp4s0.162-1 ipv4.method auto; \ > nmcli con down uuid 7bea4bfb-6e6d-447f-8475-fe413f05f520; \ > nmcli con up uuid 7bea4bfb-6e6d-447f-8475-fe413f05f520; \ > nmcli con up id enp4s0.162-1 Connection 'enp4s0.162-1' (88f2f4dc-aac9-4fda-a889-4a2f79b710f3) successfully added. [root@orchid-vds2 ~]# nmcli con show --active NAME UUID TYPE DEVICE System enp4s0 7bea4bfb-6e6d-447f-8475-fe413f05f520 802-3-ethernet enp4s0 enp4s0.162-1 88f2f4dc-aac9-4fda-a889-4a2f79b710f3 vlan enp4s0.162 [root@orchid-vds2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp4s0 ifcfg-enp4s0 ifcfg-enp4s0.162-1 [root@orchid-vds2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp4s0 # Generated by parse-kickstart IPV6INIT=no DEVICE="enp4s0" ONBOOT="yes" UUID="7bea4bfb-6e6d-447f-8475-fe413f05f520" TYPE=Ethernet NAME="System enp4s0" [root@orchid-vds2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp4s0.162-1 VLAN=yes TYPE=Vlan PHYSDEV=enp4s0 <<-- VLAN_ID=162 REORDER_HDR=yes GVRP=no MVRP=no BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=enp4s0.162-1 UUID=88f2f4dc-aac9-4fda-a889-4a2f79b710f3 ONBOOT=yes PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes - When adding host in such scenario, vdsm is handling such connection ifcfg-enp4s0.162-1 just fine as part of the fix for BZ 1367378 and host added successfully to engine, but, it's not removing the enp4s0.162-1 connection as it should, because vdsm looking for DEVICE= line in the ifcfg files and vlan connection missing such line and have PHYSDEV= line instead. Leaving older connection can lead to problems during reboots and vdsm should be able to remove this connections as doing for other devices created by NM. Version-Release number of selected component (if applicable): vdsm-4.18.15.2-1.el7ev.x86_64 Steps to Reproduce: 1. Create vlan connection/s with nmcli over 1 device 2. Add host over the vlan device to rhv-m Actual results: Host added successfully, but, connections like ifcfg-enp4s0.162-1 remain, because of the PHYSDEV= line. Expected results: ifcfg-enp4s0.162-1 connection should be removed by vdsm Additional info: See also https://bugzilla.redhat.com/show_bug.cgi?id=1367378
Verified on - vdsm-4.18.16-1.el7ev.x86_64