Bug 829160 - virsh connect should not disconnect current connection until a new connection succeeds
Summary: virsh connect should not disconnect current connection until a new connection...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-06 06:04 UTC by Huang Wenlong
Modified: 2016-04-21 13:45 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-21 13:45:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Huang Wenlong 2012-06-06 06:04:03 UTC
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 12:08:31 UTC
Disussion in upstream.

https://www.redhat.com/archives/libvir-list/2012-June/msg00270.html

Comment 5 Cole Robinson 2016-04-20 18:38:03 UTC
I sent a patch upstream:

http://www.redhat.com/archives/libvir-list/2016-April/msg01349.html

Comment 6 Cole Robinson 2016-04-21 13:45:17 UTC
Pushed upstream now:

commit a02a859be40ab49b79cc3c4ff4d735878139cf30
Author: Cole Robinson <crobinso>
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.