Bug 1368417
Summary: | update-device fail to update startupPolicy for hard disks with --persistent but successful with --live | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pzhang> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | lijuan men <lmen> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | dyuan, jdenemar, lmen, rbalakri, xuzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.0.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 17:11:42 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
Pei Zhang
2016-08-19 10:32:31 UTC
For historical reasons, startupPolicy (and while update-device) aimed at live update so config update never got that much attention. Therefore just cdroms and floppies can be updated. I agree that it is a stupid limitation. Will work on the patches. Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2016-September/msg00033.html I've just pushed patch upstream: commit 3193a594475f1565e03ddec22fd72af08e95adb2 Author: Michal Privoznik <mprivozn> AuthorDate: Wed Aug 31 11:09:58 2016 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Tue Sep 27 17:27:53 2016 +0200 qemuDomainUpdateDeviceConfig: Allow full disk update https://bugzilla.redhat.com/show_bug.cgi?id=1368417 So far, when it comes to 'virsh update-device --config' of disks we are limiting ourselves for just the disk source update and just for CDROMs and floppies. This makes no sense. Especially if you look around and see that we already allow full update to graphics and net devices. So let's just take whatever XML user wants to have there and replace our internal definition with it. Signed-off-by: Michal Privoznik <mprivozn> v2.2.0-241-g3193a59 verify the bug version: libvirt-3.2.0-6.el7 qemu-kvm-rhev-2.9.0-6.el7.x86_64 scenario1: [root@lmen1 ~]# virsh dumpxml uefi <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='optional'/> <backingStore/> <target dev='sda' bus='sata'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> [root@lmen1 ~]# cat disk.xml <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='mandatory'/> <target dev='sda' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> [root@lmen1 ~]# virsh update-device uefi disk.xml --live Device updated successfully [root@lmen1 ~]# virsh dumpxml uefi | grep disk -A 12 ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='mandatory'/> <backingStore/> <target dev='sda' bus='sata'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> #virsh edit uefi -->startupPolicy='optional' scenario2: [root@lmen1 ~]# virsh dumpxml uefi | grep disk -A 12 ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='optional'/> <backingStore/> <target dev='sda' bus='sata'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> [root@lmen1 ~]# cat disk.xml <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='mandatory'/> <target dev='sda' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> [root@lmen1 ~]# virsh update-device uefi disk.xml --config Device updated successfully [root@lmen1 ~]# virsh dumpxml uefi | grep disk -A 12 ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='optional'/> <backingStore/> <target dev='sda' bus='sata'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> [root@lmen1 ~]# virsh edit uefi <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='mandatory'/> <target dev='sda' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> scenario3: [root@lmen1 ~]# virsh dumpxml uefi | grep disk -A 12 ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='optional'/> <backingStore/> <target dev='sda' bus='sata'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> [root@lmen1 ~]# cat disk.xml <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='mandatory'/> <target dev='sda' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> [root@lmen1 ~]# virsh update-device uefi disk.xml --persistent Device updated successfully [root@lmen1 ~]# virsh dumpxml uefi | grep disk -A 12 ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='mandatory'/> <backingStore/> <target dev='sda' bus='sata'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> #virsh edit uefi <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/uefi.qcow2' startupPolicy='mandatory'/> <target dev='sda' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 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-2017:1846 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-2017:1846 |