Description of problem:
Persistent-net rule is not correct when migrating multiple nics
Version-Release number of selected component (if applicable):
MTV 2.6.6
How reproducible:
100%
Steps to Reproduce:
Scenario 1:
Step1: Create Centos 7.9 VM with 1 nic: ens192 dhcp with VM network, 1 nic: ens224 static ip with Mgmt network, in the interface ifcfg-ens* file, the items with '..'
Step2: Map the VM network to Pod network, map Mgmt newtork to NAD network, cold migrate VM with 'preserved static ip: on'
Step3: After cold migration, check the ens192 changed to eth1 10.0.2.2, ens224 changed to eth0, ipv4 no change, there is no persistent-net rule for static ip nic: ens224
Scenario 2:
Step1: Create Centos 7.9 VM with 1 nic: ens192 static ip with VM network, 1 nic: ens224 static ip with Mgmt network, in the interface ifcfg-ens* file, the items with '..'
Step2: Map the VM network to Pod network, map Mgmt newtork to NAD network, cold migrate VM with 'preserved static ip: on'
Step3: After cold migration, check the ens192 no change, it's ipaddress no change, ens224 changed to eth0, ipv4 no change. Check the 70-persistent-net.rules:
SUBSYSTEM==”net”, ACTION==”add”, ATTR{address}==”00:50:56:a0:4d:43”, NAME=”ens192” -> should be ens224
Actual results:
In scenario 1: After migration, there is no persistent-net rule for static ip nic: ens224 In scenario 2: After migration, the persistent-net rule is for ens192
Expected results:
In scenario 1: After migration, there is persistent-net rule for static ip nic: ens224 In scenario 2: After migration, the persistent-net rule is for nic: ens224 as it mapped to NAD network
- links to
-
RHBA-2024:139263 MTV 2.7.0 Images