Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-76443

Hotplug interface name might change after rebooting the VM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • CNV v4.18.23
    • CNV Network
    • Quality / Stability / Reliability
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Important
    • None

      Description of problem:

      In 4.18, OpenShift Virtualization reserves (4 − the number of existing interfaces) PCI ports for hot-plugging as per https://github.com/kubevirt/kubevirt/blob/v1.4.1/pkg/virt-launcher/virtwrap/nichotplug.go#L215 .

       

      So when a VM starts with four interfaces, no PCI ports are reserved for hot-plugging. In the following example, 0x01–0x04 were assigned to the existing NICs, and 0x05 was assigned to the virtio-scsi controller:

       

          <interface type='ethernet'>
            <mac address='02:97:ad:00:00:5f'/>
            <target dev='tapa6d2cf02735' managed='no'/>
            <model type='virtio-non-transitional'/>
            <mtu size='1500'/>
            <alias name='ua-nic-maroon-eel-62'/>
            <rom enabled='no'/>
            <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>         <===
          </interface>
          <interface type='ethernet'>
            <mac address='02:97:ad:00:00:60'/>
            <target dev='tapb32d19686b8' managed='no'/>
            <model type='virtio-non-transitional'/>
            <mtu size='1500'/>
            <alias name='ua-nic-apricot-cat-94'/>
            <rom enabled='no'/>
            <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>         <===
          </interface>
          <interface type='ethernet'>
            <mac address='02:97:ad:00:00:62'/>
            <target dev='tapa21ab9b95c1' managed='no'/>
            <model type='virtio-non-transitional'/>
            <mtu size='1500'/>
            <alias name='ua-nic-amber-fly-45'/>
            <rom enabled='no'/>
            <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>       <===
          </interface>
          <interface type='ethernet'>
            <mac address='02:97:ad:00:00:63'/>
            <target dev='tapfaef80d3caf' managed='no'/>
            <model type='virtio-non-transitional'/>
            <mtu size='1500'/>
            <alias name='ua-nic-indigo-capybara-36'/>
            <rom enabled='no'/>
            <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>     <===
          </interface>
          <controller type='scsi' index='0' model='virtio-non-transitional'>
            <alias name='scsi0'/>
            <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
          </controller>

       

      If we hotplug a interface on this VM, it will assign the next available PCI address, and in this case, it was 0x0a.

          <interface type='ethernet'>
            <mac address='02:97:ad:00:00:67'/>
            <target dev='tap0159300c028' managed='no'/>
            <model type='virtio-non-transitional'/>
            <mtu size='1500'/>
            <alias name='ua-nic-black-chickadee-60'/>
            <rom enabled='no'/>
            <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>       
          </interface> 

      This interface was named enp10s0 by the RHEL guest OS.

      However, after rebooting the VM, the interface’s PCI address was reassigned to 0x05:

          <interface type='ethernet'>
            <mac address='02:97:ad:00:00:67'/>
            <target dev='tap0159300c028' managed='no'/>
            <model type='virtio-non-transitional'/>
            <mtu size='1500'/>
            <alias name='ua-nic-black-chickadee-60'/>
            <rom enabled='no'/>
            <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
          </interface>

      This caused the change of the interface name in the guest OS from enp10s0 to enp5s0, and the interface will lose it's network configuration.

      Version-Release number of selected component (if applicable):

      OpenShift Virtualization 4.18.23

      How reproducible:

      100%

      Steps to Reproduce:

      1. Create a RHEL VM and attach 4 NICs to the VM.
      2. Hotplug a new interface.
      3. Check the name of the new interface from the VM.
      4. Reboot the VM, and check if the new interface name is changed after the reboot.

      Actual results:

      Hotplug interface name might change after rebooting the VM causing the lose of previously assigned interface configuration

      Expected results:

       

      Additional info:

       

              phoracek@redhat.com Petr Horacek
              rhn-support-nashok Nijin Ashok
              Yoss Segev Yoss Segev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: