[libvirt] [PATCH] virsh: let 'connect' without args remember -c option

Eric Blake eblake at redhat.com
Mon Jun 11 15:33:40 UTC 2012


On 06/11/2012 07:01 AM, Daniel P. Berrange wrote:

> Personally I think we should return a fatal error if the user
> attempts to use 'connect' in non-interactive mode, and not try
> to hack it to behave the same as --connect/-c.

I still think that 'connect URI' is useful in non-interactive mode - I
can see batching up a series of commands that crosses several
connections, and therefore where using 'connect' in that batch to swap
connections makes sense.

But I think I can agree to the idea that if we are non-interactive (ie.
stdin is not a tty), then 'connect' without arguments always giving an
error instead of (re-)trying a NULL connection or even remembering the
-c option would make sense.  As for the particular issue I was trying to
solve, having 'connect' without arguments error out would at least avoid
my issue of 'make check' taking forever when it gets to the 'virsh
connect' call.

And I _still_ think that we need to fix 'connect URI' to not lose the
current connection until after the new connection is established, as it
is better than the current behavior that kills the current connection
first even if the new connection is not possible.

I'll try to incorporate all of this into a v2.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120611/3acc4ed7/attachment-0001.sig>


More information about the libvir-list mailing list