diff mbox

virsh: Document change-media --live --config confusion

Message ID dd39ac1610dd1fdfa79a5432e0753b743e2a3496.1461674994.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson April 26, 2016, 12:49 p.m. UTC
If 'virsh change-media --live --config ...' is requested, the
inactive XML is used as the template for the media change/eject.
If the runtime XML has diverged from the inactive XML, say via
other update operations, those changes may be undone since the
command will sync all non-path XML with the inactive config.

To 'fix' this would involve two passes of XML editing and calls
to UpdateDevice, which is kind of a pain for a case that won't
affect most users. So let's just document it instead

https://bugzilla.redhat.com/show_bug.cgi?id=1243342
---
 tools/virsh.pod | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.7.4

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

Comments

Cole Robinson April 26, 2016, 1:31 p.m. UTC | #1
On 04/26/2016 08:49 AM, Cole Robinson wrote:
> If 'virsh change-media --live --config ...' is requested, the

> inactive XML is used as the template for the media change/eject.

> If the runtime XML has diverged from the inactive XML, say via

> other update operations, those changes may be undone since the

> command will sync all non-path XML with the inactive config.

> 

> To 'fix' this would involve two passes of XML editing and calls

> to UpdateDevice, which is kind of a pain for a case that won't

> affect most users. So let's just document it instead

> 

> https://bugzilla.redhat.com/show_bug.cgi?id=1243342

> ---

>  tools/virsh.pod | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/tools/virsh.pod b/tools/virsh.pod

> index 90ab47d..4c1b7fc 100644

> --- a/tools/virsh.pod

> +++ b/tools/virsh.pod

> @@ -2794,6 +2794,9 @@ the hypervisor's implementation.

>  Both I<--live> and I<--config> flags may be given, but I<--current> is

>  exclusive. If no flag is specified, behavior is different depending

>  on hypervisor.

> +If both I<--live> and I<--config> are specified, the inactive device XML

> +is used as the template for the media change. If your I<--live> device XML

> +has received runtime changes, they may be removed.

>  If I<--print-xml> is specified, the XML that would be used to change media is

>  printed instead of changing the media.

>  

> 


Actually I'm dropping this. I see that Nitesh has patches to properly fix just
this type of issue for detach-interface, so it's better to extend that pattern
to change-media and detach-disk too

- Cole

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

Patch

diff --git a/tools/virsh.pod b/tools/virsh.pod
index 90ab47d..4c1b7fc 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -2794,6 +2794,9 @@  the hypervisor's implementation.
 Both I<--live> and I<--config> flags may be given, but I<--current> is
 exclusive. If no flag is specified, behavior is different depending
 on hypervisor.
+If both I<--live> and I<--config> are specified, the inactive device XML
+is used as the template for the media change. If your I<--live> device XML
+has received runtime changes, they may be removed.
 If I<--print-xml> is specified, the XML that would be used to change media is
 printed instead of changing the media.