Bug 829160 - virsh connect should not disconnect current connection until a new connection succeeds
virsh connect should not disconnect current connection until a new connection...
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-06 02:04 EDT by Huang Wenlong
Modified: 2016-04-21 09:45 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-21 09:45:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Huang Wenlong 2012-06-06 02:04:03 EDT
Description of problem:
virsh connect should reconnect local hypervisor when connected a bad hypervisor and failed
libvirt connection should reconnect local hypervisor  after connect a bad hypervisor 


Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # connect test
error: Failed to connect to the hypervisor
error: no connection driver available for No connection for URI test
error: Failed to reconnect to the hypervisor

virsh # list
error: Failed to reconnect to the hypervisor
error: no valid connection
error: no connection driver available for No connection for URI test
error: Failed to reconnect to the hypervisor

virsh # connect

virsh # list
 Id    Name                           State
----------------------------------------------------



Actual results:
libvirt connection is broken after connect a bad hyperv


Expected results:
  libvirt connection is not broken after connect a bad hyperv

Additional info:
if user want to continue use virsh after connect a bad hypervisor,he must connect a valid hypervisor manualed ,so if libvirt can restore a valid hypervisor to user after a bad connection ,this is a good user experience
Comment 2 Osier Yang 2012-06-18 08:08:31 EDT
Disussion in upstream.

https://www.redhat.com/archives/libvir-list/2012-June/msg00270.html
Comment 5 Cole Robinson 2016-04-20 14:38:03 EDT
I sent a patch upstream:

http://www.redhat.com/archives/libvir-list/2016-April/msg01349.html
Comment 6 Cole Robinson 2016-04-21 09:45:17 EDT
Pushed upstream now:

commit a02a859be40ab49b79cc3c4ff4d735878139cf30
Author: Cole Robinson <crobinso@redhat.com>
Date:   Wed Apr 20 13:56:27 2016 -0400

    virsh: Don't clear old connection if 'connect $uri' fails

Note You need to log in before you can comment on or make changes to this bug.