Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-22714

macvtap0 is not automatically removed after update-device and vm shutdown.

    • libvirt-10.0.0-2.el9
    • None
    • None
    • rhel-sst-virt-tools
    • ssg_virtualization
    • 26
    • None
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      macvtap0 is not automatically removed after update-device and vm shutdown.

      Please provide the package NVR for which bug is seen:

      libvirt-10.0.0-1.el9.x86_64

      qemu-kvm-8.2.0-2.el9.x86_64

      How reproducible:

      100%

      Steps to reproduce

      1. Start a vm with direct type interface<interface type='direct' trustGuestRxFilters='yes'>
        <source dev='eno2' mode='bridge'/>
        <model type='virtio'/>
        </interface>
      2. Update device, for example change trustGuestRxFilters='to'
        1. #virsh update-device avocado-vt-vm1 direct.xml
          Device updated successfully
      3. Shutdown vm
        1. #virsh shutdown avocado-vt-vm1
          Domain 'avocado-vt-vm1' is being shutdown
      4. Check macvtap device status
        1. #ip a|grep macvtap
          197: macvtap0@eno1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 500
        2. #virsh start avocado-vt-vm1
          error: Failed to start domain 'avocado-vt-vm1'
          error: Cannot set interface flags on 'macvtap1': Address already in use

      Expected results

      Actual results

            [RHEL-22714] macvtap0 is not automatically removed after update-device and vm shutdown.

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Moderate: libvirt security update), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHSA-2024:2236

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Moderate: libvirt security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:2236

            Verify with:

            libvirt-10.0.0-3.el9.x86_64
            qemu-kvm-8.2.0-6.el9.x86_64

            Test steps:

            s1: start vm with direct type interface, shutdown.
                <interface type='direct' trustGuestRxFilters='yes'>
                  <mac address='52:54:00:08:8b:9f'/>
                  <source dev='eno2' mode='bridge'/>
                  <model type='virtio'/>
                  <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
                </interface>
            # ip a|grep macvtap
            16: macvtap0@eno2: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 500
            # virsh shutdown avocado-vt-vm1 
            Domain 'avocado-vt-vm1' is being shutdown
            # ip a|grep macvtap
            (nothing output) 
            
            s2: update-device with trustGuestRxFilters, shutdown vm.
            # virsh update-device avocado-vt-vm1 iface.xml 
            Device updated successfully
            # virsh dumpxml avocado-vt-vm1 --xpath //interface
            <interface type="direct" trustGuestRxFilters="no"> ...
            # ip a|grep macvtap
            17: macvtap1@eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 500
            # virsh shutdown avocado-vt-vm1 
            Domain 'avocado-vt-vm1' is being shutdown
            # ip a|grep macvtap
            (nothing)
            
            Also tested for linkstate, qos.
            
            s3: update link state by domif-setlink, shutdown vm.
            # virsh domif-setlink  avocado-vt-vm1 macvtap2 down
            Device updated successfully 
            # virsh domif-getlink avocado-vt-vm1 macvtap2 
            macvtap2 down
            # ip a|grep macvtap
            18: macvtap2@eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 500
            # virsh shutdown avocado-vt-vm1 
            Domain 'avocado-vt-vm1' is being shutdown
            # ip a|grep macvtap
            (nothing)
            
            s4: update qos by domiftune, shutdown vm.
            # virsh domiftune avocado-vt-vm1  macvtap3 200,400,600 100,300,500 
            # virsh dumpxml avocado-vt-vm1 --xpath //interface
            <interface type="direct" trustGuestRxFilters="yes">
              <mac address="52:54:00:08:8b:9f"/>
              <source dev="eno2" mode="bridge"/>
              <bandwidth>
                <inbound average="200" peak="400" burst="600"/>
                <outbound average="100" peak="300" burst="500"/>
              </bandwidth>
            ... 
            # virsh shutdown avocado-vt-vm1 
            Domain 'avocado-vt-vm1' is being shutdown 
            # ip a|grep macvtap
            (nothing)

            After update device for interface and vm shutdown, the macvtap device is auto removed as expected. So marking this bug as verified PASS. 

             

             

            Yanqiu Zhang added a comment - Verify with: libvirt-10.0.0-3.el9.x86_64 qemu-kvm-8.2.0-6.el9.x86_64 Test steps: s1: start vm with direct type interface , shutdown.     < interface type= 'direct' trustGuestRxFilters= 'yes' >       <mac address= '52:54:00:08:8b:9f' />       <source dev= 'eno2' mode= 'bridge' />       <model type= 'virtio' />       <address type= 'pci' domain= '0x0000' bus= '0x01' slot= '0x00' function= '0x0' />     </ interface > # ip a|grep macvtap 16: macvtap0@eno2: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 500 # virsh shutdown avocado-vt-vm1  Domain 'avocado-vt-vm1' is being shutdown # ip a|grep macvtap (nothing output) s2: update-device with trustGuestRxFilters, shutdown vm. # virsh update-device avocado-vt-vm1 iface.xml  Device updated successfully # virsh dumpxml avocado-vt-vm1 --xpath // interface < interface type= "direct" trustGuestRxFilters= "no" > ... # ip a|grep macvtap 17: macvtap1@eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 500 # virsh shutdown avocado-vt-vm1  Domain 'avocado-vt-vm1' is being shutdown # ip a|grep macvtap (nothing) Also tested for linkstate, qos. s3: update link state by domif-setlink, shutdown vm. # virsh domif-setlink  avocado-vt-vm1 macvtap2 down Device updated successfully # virsh domif-getlink avocado-vt-vm1 macvtap2  macvtap2 down # ip a|grep macvtap 18: macvtap2@eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 500 # virsh shutdown avocado-vt-vm1  Domain 'avocado-vt-vm1' is being shutdown # ip a|grep macvtap (nothing) s4: update qos by domiftune, shutdown vm. # virsh domiftune avocado-vt-vm1  macvtap3 200,400,600 100,300,500 # virsh dumpxml avocado-vt-vm1 --xpath // interface < interface type= "direct" trustGuestRxFilters= "yes" >   <mac address= "52:54:00:08:8b:9f" />   <source dev= "eno2" mode= "bridge" />   <bandwidth>     <inbound average= "200" peak= "400" burst= "600" />     <outbound average= "100" peak= "300" burst= "500" />   </bandwidth> ... # virsh shutdown avocado-vt-vm1  Domain 'avocado-vt-vm1' is being shutdown # ip a|grep macvtap (nothing) After update device for interface and vm shutdown, the macvtap device is auto removed as expected. So marking this bug as verified PASS.     

            gitlab-bot added a comment -

            Jiri Denemark mentioned this issue in a commit of Red Hat / centos-stream / rpms / libvirt on branch c9s:

            libvirt-10.0.0-2.el9

            gitlab-bot added a comment - Jiri Denemark mentioned this issue in a commit of Red Hat / centos-stream / rpms / libvirt on branch c9s : libvirt-10.0.0-2.el9

            gitlab-bot added a comment -

            Jiri Denemark mentioned this issue in a merge request of Red Hat / centos-stream / rpms / libvirt on branch libvirt-10.0.0-2.el9:

            libvirt-10.0.0-2.el9

            gitlab-bot added a comment - Jiri Denemark mentioned this issue in a merge request of Red Hat / centos-stream / rpms / libvirt on branch libvirt-10.0.0-2.el9 : libvirt-10.0.0-2.el9

            Tested with libvirt-10.0.0-2.el9_rc.9ce5f12af1.x86_64, qemu-kvm-8.2.0-3.el9.x86_64

            1. update-device with trustGuestRxFilters.

            # virsh dumpxml avocado-vt-vm1 --xpath //interface
            <interface type="direct" trustGuestRxFilters="yes">
            ...
            # virsh update-device avocado-vt-vm1 direct2.xml 
            Device updated successfully
            # virsh dumpxml avocado-vt-vm1 --xpath //interface
            <interface type="direct" trustGuestRxFilters="no">
            ...
            # virsh shutdown avocado-vt-vm1 
            Domain 'avocado-vt-vm1' is being shutdown
            # ip a|grep macvtap
            (nothing output)
            # virsh start avocado-vt-vm1 
            Domain 'avocado-vt-vm1' started

            2. update-device with bandwidth

             

            # virsh dumpxml avocado-vt-vm1 |grep bandwidth
            (no output)
             # virsh update-device avocado-vt-vm1 direct0.xml 
            Device updated successfully 
            # virsh dumpxml avocado-vt-vm1 --xpath //bandwidth
            <bandwidth>
              <inbound average="100" peak="300" burst="500"/>
              <outbound average="200" peak="400" burst="600"/>
            </bandwidth>
            # virsh shutdown avocado-vt-vm1 
            Domain 'avocado-vt-vm1' is being shutdown
            # ip a|grep macvtap
            (nothing output) 
            # virsh start avocado-vt-vm1 
            Domain 'avocado-vt-vm1' started

            Preliminary testing pass.

             

             

            Yanqiu Zhang added a comment - Tested with libvirt-10.0.0-2.el9_rc.9ce5f12af1.x86_64, qemu-kvm-8.2.0-3.el9.x86_64 1. update-device with trustGuestRxFilters. # virsh dumpxml avocado-vt-vm1 --xpath // interface < interface type= "direct" trustGuestRxFilters= "yes" > ... # virsh update-device avocado-vt-vm1 direct2.xml  Device updated successfully # virsh dumpxml avocado-vt-vm1 --xpath // interface < interface type= "direct" trustGuestRxFilters= "no" > ... # virsh shutdown avocado-vt-vm1  Domain 'avocado-vt-vm1' is being shutdown # ip a|grep macvtap (nothing output) # virsh start avocado-vt-vm1  Domain 'avocado-vt-vm1' started 2. update-device with bandwidth   # virsh dumpxml avocado-vt-vm1 |grep bandwidth (no output) # virsh update-device avocado-vt-vm1 direct0.xml  Device updated successfully # virsh dumpxml avocado-vt-vm1 --xpath //bandwidth <bandwidth>   <inbound average= "100" peak= "300" burst= "500" />   <outbound average= "200" peak= "400" burst= "600" /> </bandwidth> # virsh shutdown avocado-vt-vm1  Domain 'avocado-vt-vm1' is being shutdown # ip a|grep macvtap (nothing output) # virsh start avocado-vt-vm1  Domain 'avocado-vt-vm1' started Preliminary testing pass.    

            Merged upstream as:

            ccfc5c1e16 qemu_hotplug: Don't lose 'created' flag in qemuDomainChangeNet()

            Michal Privoznik added a comment - Merged upstream as: ccfc5c1e16 qemu_hotplug: Don't lose 'created' flag in qemuDomainChangeNet()

            Michal Privoznik added a comment - Patch posted onto the list: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/AR4VJLO7Y33AHYLSHOZDKCMZ3CCUFG6E/

              mprivozn@redhat.com Michal Privoznik
              yanqzhan1@redhat.com Yanqiu Zhang
              Haijiao Zhao
              Michal Privoznik Michal Privoznik
              Yanqiu Zhang Yanqiu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: