]> xenbits.xensource.com Git - libvirt.git/commit
virsh: Don't clear old connection if 'connect $uri' fails
authorCole Robinson <crobinso@redhat.com>
Wed, 20 Apr 2016 17:56:27 +0000 (13:56 -0400)
committerCole Robinson <crobinso@redhat.com>
Thu, 21 Apr 2016 13:29:20 +0000 (09:29 -0400)
commita02a859be40ab49b79cc3c4ff4d735878139cf30
tree5cdb42fbcd9b6487bf17d6e22eabe6aaf4228b8b
parentf1bae376b71ecc712e5d8359382290db1120e13e
virsh: Don't clear old connection if 'connect $uri' fails

    virsh # list --all
     Id    Name                           State
    ----------------------------------------------------
     1     test                           running

    virsh # connect frob
    error: Failed to connect to the hypervisor
    error: no connection driver available for frob

    virsh # list --all
    error: failed to connect to the hypervisor
    error: no valid connection
    error: no connection driver available for frob

Seems sensible IMO to just not clear out the old connection state
until the new virConnectOpen succeeds.

https://bugzilla.redhat.com/show_bug.cgi?id=829160
tools/virsh.c