Bug 1390474 - vdsm should handle ifcfg files that have PHYSDEV= instead DEVICE= for vlan connection created with nmcli
Summary: vdsm should handle ifcfg files that have PHYSDEV= instead DEVICE= for vlan co...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.18.15.2
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ovirt-4.0.6
: 4.18.16
Assignee: Edward Haas
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks: 1304509
TreeView+ depends on / blocked
 
Reported: 2016-11-01 07:29 UTC by Michael Burman
Modified: 2017-01-18 07:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-18 07:27:04 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.0.z+
ylavi: planning_ack+
danken: devel_ack+
myakove: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 65996 0 master MERGED net: acquire ifcfg files to be used by VDSM - refactoring 2020-07-24 20:06:56 UTC
oVirt gerrit 66010 0 master MERGED net: Extend the acquire of ifcfg files to include VLANs 2020-07-24 20:06:56 UTC
oVirt gerrit 66119 0 master MERGED net: Use getIfaceCfg in IfcfgAcquire 2020-07-24 20:06:56 UTC
oVirt gerrit 66129 0 ovirt-4.0 MERGED net: acquire ifcfg files to be used by VDSM - refactoring 2020-07-24 20:06:56 UTC
oVirt gerrit 66158 0 ovirt-4.0 MERGED net: Extend the acquire of ifcfg files to include VLANs 2020-07-24 20:06:56 UTC
oVirt gerrit 66159 0 ovirt-4.0 MERGED net: Use getIfaceCfg in IfcfgAcquire 2020-07-24 20:06:56 UTC

Description Michael Burman 2016-11-01 07:29:46 UTC
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

Comment 1 Michael Burman 2016-11-20 14:13:22 UTC
Verified on - vdsm-4.18.16-1.el7ev.x86_64


Note You need to log in before you can comment on or make changes to this bug.