Bug 1729022
| Summary: | Attaching a device with a taken address succeeds when vm inactive | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Han Han <hhan> |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED ERRATA | QA Contact: | Han Han <hhan> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.1 | CC: | bugproxy, chhu, dyuan, hannsj_uhl, jdenemar, jiyan, jsuchane, lmen, mprivozn, xuzhang |
| Target Milestone: | rc | Keywords: | Patch, Upstream |
| Target Release: | 8.1 | Flags: | knoel:
mirror+
|
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-5.6.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1692296 | Environment: | |
| Last Closed: | 2019-11-06 07:17:49 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: | |||
| Bug Depends On: | 1692296, 1692354 | ||
| Bug Blocks: | 1624641 | ||
|
Description
Han Han
2019-07-11 08:23:06 UTC
Test on upstream libvirt-5.6:
1. Start a vm with scsi disk:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/tmp/scsi.qcow2'/>
<target dev='sdb' bus='scsi'/>
<serial>second-scsi</serial>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
2. Cold plug a scsi disk with the same addr:
# cat /tmp/scsi-cdrom.xml
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='sdd' bus='scsi'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
# virsh attach-device copy /tmp/scsi-cdrom.xml --config
error: Failed to attach device from /tmp/scsi-cdrom.xml
error: Requested operation is not valid: Domain already contains a disk with that address
Works as expected.
Although it works for this bug, I find such cases still failed: - scsi disk cold update with already used addr - sata disk cold plug with already used addr - sata disk cold update with already used addr - ide disk cold plug with with already used addr - ide disk cold update with already used addr Michal, could you fix them all together? Verified as comment1 on libvirt-5.6.0-5.module+el8.1.0+4229+2e4e348c.x86_64 qemu-kvm-4.1.0-10.module+el8.1.0+4234+33aa4f57.x86_64 For the issues of comment2, how about solve them by calling virDomainDefValidate at the end of qemuDomainAttachDeviceConfig and qemuDomainUpdateDeviceConfig? (In reply to Han Han from comment #5) > For the issues of comment2, how about solve them by calling > virDomainDefValidate at the end of qemuDomainAttachDeviceConfig and > qemuDomainUpdateDeviceConfig? Sorry for late response. Yeah that looks like a good solution. Currently I'm swamped with some other work so if you want to cook the patches I will happily review them. 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/RHBA-2019:3723 |