Bug 822311 - virt-viewer cannot reconnect guest after restart libvirtd
virt-viewer cannot reconnect guest after restart libvirtd
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Virt Viewer Maint
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-16 23:12 EDT by yuping zhang
Modified: 2015-03-06 03:59 EST (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-03 12:52:48 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 yuping zhang 2012-05-16 23:12:48 EDT
Description of problem:
Use virt-viewer --reconnect  connect to a guest,then shutdown guest,restart libvirtd and start guest again,the virt-viewer can not connect guest again.

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-8.el6.x86_64
libvirt-0.9.10-20.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.# virt-viewer --reconnect rhel6.2
2.Shutdown the guest with #virsh destroy rhel6.2
3.Restart libvirtd #service libvirtd restart
4.Start the guest again # virsh start rhel6.2
5.Check if the guest show in virt-viewer
 
Actual results:
virt-viewer console displays 'Waiting for guest domain to re-start'.

Expected results:
virt-viewer should reconnect with the guest.

Additional info:
1.Both spice and vnc have this issue.
2.Debug info:
.....
** (virt-viewer:14567): DEBUG: Dispatch handler 7 1 0x1a3dcd0
** (virt-viewer:14567): DEBUG: Update timeout 0x1a3da30 1 0
** (virt-viewer:14567): DEBUG: Dispatch timeout 0x1a3da30 0x3f455211b0 1 0x1a3d630
** (virt-viewer:14567): DEBUG: Update timeout 0x1a3da30 1 -1
** (virt-viewer:14567): DEBUG: Dispatch handler 7 1 0x1a3dcd0
** (virt-viewer:14567): DEBUG: Update timeout 0x1a3da30 1 0
** (virt-viewer:14567): DEBUG: Dispatch timeout 0x1a3da30 0x3f455211b0 1 0x1a3d630
** (virt-viewer:14567): DEBUG: Update timeout 0x1a3da30 1 -1
** (virt-viewer:14567): DEBUG: Dispatch handler 7 1 0x1a3dcd0
** (virt-viewer:14567): DEBUG: Update timeout 0x1a3da30 1 0
** (virt-viewer:14567): DEBUG: Dispatch timeout 0x1a3da30 0x3f455211b0 1 0x1a3d630
** (virt-viewer:14567): DEBUG: Update timeout 0x1a3da30 1 -1
** (virt-viewer:14567): DEBUG: Dispatch handler 7 9 0x1a3dcd0
** (virt-viewer:14567): DEBUG: Remove handle 1 7
** (virt-viewer:14567): DEBUG: Cleanup of handle 0x1a3d870
Comment 1 Daniel Berrange 2012-07-26 13:25:01 EDT
The main problem here is that libvirt does not yet provide a reliable way to detect death of a connection to libvirtd. The following patch series introduces a suitable API:

https://www.redhat.com/archives/libvir-list/2012-July/msg01315.html

This is expected to be part of libvirt 0.9.14 release, so if RHEL updates to that, we can make use of it in virt-viewer.
Comment 4 Jonathon Jongsma 2014-02-03 17:48:49 EST
This now works in upstream
Comment 6 Marc-Andre Lureau 2014-04-03 07:40:56 EDT
(In reply to Jonathon Jongsma from comment #4)
> This now works in upstream

since you moved the bug to POST, could find which change actually solved the bug?

thanks
Comment 7 Jonathon Jongsma 2014-04-03 12:48:47 EDT
commit fa39c5335c2ab5e51b544e42744c3559146551a3
Author: Michal Privoznik <mprivozn@redhat.com>
Date:   Thu Nov 8 17:07:43 2012 +0100

    Reconnect to libvirtd after connection breaks
    
    Currently, if user wants to reconnect to a domain he can use
    '-r' cmd line argument. This makes virt-viewer listen to
    domain events. However, if connection to libvirtd breaks
    somehow, we will receive no longer any event. Hence we must
    reconnect to the libvirt.
Comment 8 Marc-Andre Lureau 2014-04-03 12:52:48 EDT
So it is fixed since  0.5.5.

This is already in RHEL6, which has virt-viewer-0.5.6-9.el6.x86_64

Please reopen if it still doesn't work.

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