Bug 1461301
Summary: | unknown error occurred when attach a disk with a pci address already occupied in guest while virtlockd is enabled | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yafu <yafu> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | Han Han <hhan> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.4 | CC: | dyuan, eskultet, hhan, lmen, pkrempa, rbalakri, xuzhang, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.8.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 10:48:37 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: | |
Embargoed: |
Description
yafu
2017-06-14 07:25:07 UTC
Confirmed regression: It works on libvirt-2.0.0-10.el7_3.9.x86_64 of RHEL7.3.z 1. Set lock_manager = "lockd" in /etc/libvirt/qemu.conf 2. Restart virtlockd and libvirtd 3. Start a VM: # virsh list Id Name State ---------------------------------------------------- 1 avocado-vt-vm1 running 4. Attach a disk with pci address then detach it: # virsh attach-disk avocado-vt-vm1 /tmp/raw vdb --address pci:0000.00.a.0 Disk attached successfully # virsh detach-disk avocado-vt-vm1 vdb Disk detached successfully Sorry for the mistake in comment2. Actually it is not a regression, in other words, it can be reproduced on libvirt-2.0.0-10.el7_3.9.x86_64 One more scenario: It can be reproduce when attach to an unreachable pci address: # virsh attach-disk avocado-vt-vm1 /tmp/raw vdb --address pci:000a.00.6.0 error: Failed to attach disk error: An error occurred, but the cause is unknown Fixed upstream: commit a823d0a62e858a62a585a78599b6d859c5b4dcac Author: Peter Krempa <pkrempa> Date: Mon Sep 11 15:28:15 2017 +0200 qemu: Restore errors when rolling back disk image state Some operations done to rollback disk image labelling and locking might overwrite (or clear) the actual error. Remember the original error when tearing down disk access so that it's not obscured. Verified on libvirt-3.9.0-1.el7.x86_64: 1. Setup virtlockd env: In qemu.conf: lock_manager = "lockd" # systemctl restart virtlockd # systemctl restart libvirtd 2. Start an VM. Attach two disks to the same pci address # virsh attach-disk V /tmp/a vdb --address pci:0000.00.a.0 Disk attached successfully # virsh attach-disk V /tmp/b vdc --address pci:0000.00.a.0 error: Failed to attach disk error: XML error: Attempted double use of PCI Address 0000:00:0a.0 Libvirt gives clear error message when attaching to duplicate pci address. Bug fixed. 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, 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/RHEA-2018:0704 |