Bug 1942367
Summary: | Error message can be improved to include the alias mismatch info | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | yalzhang <yalzhang> |
Component: | libvirt | Assignee: | khanicov |
Status: | CLOSED ERRATA | QA Contact: | Yanqiu Zhang <yanqzhan> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 8.3 | CC: | jdenemar, jsuchane, khanicov, smitterl, virt-maint, yanqzhan |
Target Milestone: | rc | Keywords: | Triaged, Upstream |
Target Release: | 8.4 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-7.5.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-16 07:52:17 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | 7.4.0 |
Embargoed: |
Description
yalzhang@redhat.com
2021-03-24 09:28:42 UTC
Patch proposed on the list: https://listman.redhat.com/archives/libvir-list/2021-May/msg00481.html Patch v2 proposed on the list: https://listman.redhat.com/archives/libvir-list/2021-May/msg00616.html Merged upstream as: 7ab1ba112f conf: Report alias name of the detached device in error v7.3.0-254-g7ab1ba112f Tested on: libvirt-7.5.0-1.fc35.x86_64 qemu-kvm-6.0.0-6.fc35.x86_64 virsh detach-device rhel9 net7.xml error: Failed to detach device from net7.xml error: device not found: no device found at address '0000:00:03.0' matching MAC address '52:54:00:84:71:f7' and alias 'net7' Verify on: libvirt-daemon-7.5.0-1.module+el8.5.0+11664+59f87560.x86_64 qemu-kvm-6.0.0-23.module+el8.5.0+11740+35571f13.x86_64 Steps: 0. run a vm with interfaces: # virsh dumpxml avocado-vt-vm1|grep /interface -B8 </controller> <interface type='network'> <mac address='52:54:00:8c:2a:67'/> <source network='default' portid='15705c62-4e4a-48d3-a58a-e12c78ab9baa' bridge='virbr0'/> <target dev='vnet2'/> <model type='rtl8139'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </interface> <interface type='direct'> <mac address='52:54:00:44:ff:e4'/> <source dev='enp0s25' mode='vepa'/> <target dev='macvtap2'/> <model type='rtl8139'/> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 1. Detach by right mac + wrong pci address <interface type='network'> <mac address='52:54:00:8c:2a:67'/> <source network='default' portid='4512200e-a41a-45bb-b66b-a17713703ded' bridge='virbr0'/> <target dev='vnet1'/> <model type='rtl8139'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> # virsh detach-device avocado-vt-vm1 net4.xml error: Failed to detach device from net4.xml error: device not found: no device found at address '0000:00:03.0' matching MAC address '52:54:00:8c:2a:67' and alias 'net0' 2. no mac and wrong pci # cat net8.xml <interface type='network'> <source network='default'/> <model type='rtl8139'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/> </interface> # virsh detach-device avocado-vt-vm1 net8.xml error: Failed to detach device from net8.xml error: device not found: no device found at address '0000:00:11.0' matching MAC address '(<null>)' and alias '(<null>)' 3. no PCI and wrong mac # cat net9.xml <interface type='network'> <source network='default'/> <mac address='52:54:00:76:80:66'/> <model type='rtl8139'/> </interface> # virsh detach-device avocado-vt-vm1 net9.xml error: Failed to detach device from net9.xml error: device not found: no device found at address '(<null>)' matching MAC address '52:54:00:76:80:66' and alias '(<null>)' 4.multiple interface with the same mac Change the second interface of vm to also use mac 52:54:00:8c:2a:67', <interface type='network'> <mac address='52:54:00:8c:2a:67'/> <source network='isolated' bridge='virbr2'/> </interface> # virsh detach-device avocado-vt-vm1 net11.xml error: Failed to detach device from net11.xml error: operation failed: multiple devices matching MAC address 52:54:00:8c:2a:67 found 5. no matching device found Run vm without interface device. # virsh dumpxml avocado-vt-vm1|grep interface (nothing) # cat net6.xml <interface type='network'> <source network='default' bridge='virbr0'/> </interface> # virsh detach-device avocado-vt-vm1 net6.xml error: Failed to detach device from net6.xml error: device not found: no device found at address '(<null>)' matching MAC address '(<null>)' and alias '(<null>)' Confirmed for CCW addresses with: libvirt-daemon-7.5.0-1.module+el8.5.0+11664+59f87560.s390x qemu-kvm-6.0.0-23.module+el8.5.0+11740+35571f13.s390x # virsh detach-device avocado-vt-vm1 iface_wrong_ccw.xml --config error: Failed to detach device from iface_wrong_ccw.xml error: device not found: no device found at address 'fe.0.0002' matching MAC address '52:54:00:54:eb:87' and alias '(<null>)' # cat iface_wrong_ccw.xml <interface type='network'> <mac address='52:54:00:54:eb:87'/> <source network='default'/> <model type='virtio'/> <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/> </interface> # virsh detach-device avocado-vt-vm1 iface_wrong_ccw_no_mac.xml --config error: Failed to detach device from iface_wrong_ccw_no_mac.xml error: device not found: no device found at address 'fe.0.0002' matching MAC address '(<null>)' and alias '(<null>)' # cat iface_wrong_ccw_no_mac.xml <interface type='network'> <source network='default'/> <model type='virtio'/> <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/> </interface> Thanks Sebas for ccw part testing. Since above results are as expected, mark bug as verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement 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/RHBA-2021:4684 |