Re: [PATCH 2/2] virsh: Use inactive definition when removing disk from config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/07/2014 10:12 AM, Peter Krempa wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1049529
> 
> The 'detach-disk' command in virsh used the active XML definition of a
> domain even when attempting to remove a disk from the config only. If
> the disk was only in the inactive definition the operation failed. Fix
> this by using the inactive XML in case that only the config is affected.
> ---
>  tools/virsh-domain.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

ACK.

> 
> -    if (!(doc = virDomainGetXMLDesc(dom, 0)))
> +    if (flags == VIR_DOMAIN_AFFECT_CONFIG)

Might be a bit more robust as:
(flags & (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) ==
VIR_DOMAIN_AFFECT_CONFIG
in case we have other flags set for other reasons; but right now we
don't so this works.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]