Bug 758225

Summary: reopening guest console not working
Product: [Community] Virtualization Tools Reporter: Niklas Schnelle <niklas>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, ncjeffgus, niklas, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-25 16:45:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch against RELEASE-0.9.0-1 none

Description Niklas Schnelle 2011-11-29 15:26:51 UTC
When using virt-manager 0.9 on both Arch Linux and Fedora 16
to manage a libvirt/kvm instance on Ubuntu Server 11.10 over ssh I can connect to each of the guest consoles only once when the window is closed reopening
the console doesn't work and it only shows "connecting to guest console".
After restarting virt-manager on the client machine it works again for the next time.

Version-Release number of selected component (if applicable):
virt-manager 0.9 

How reproducible:


Steps to Reproduce:
1. Connect to a remote libvirtd over ssh using virt-manager
2. Switch to a guest console
3. Close the guest console window
4. Double click on the same guest to reconnect to the console

(5. after restarting virt-manager you can reconnect)
  
Actual results:
in 4. The console doesn't open and only shows "connecting to guest console"

Expected results:
in 4. Reopen the console

Additional info:
Works with virt-manager 0.8.7 this also asks for the password again when reopening the guest console

Comment 1 Niklas Schnelle 2011-12-06 15:28:22 UTC
Created attachment 541462 [details]
Patch against RELEASE-0.9.0-1

Comment 2 Niklas Schnelle 2011-12-06 15:28:48 UTC
I started investigating this and came up with the attached patch (against tag RELEASE-0.9.0-1 as Head doesn't run here)
(also changes "if tunnels:" to "if tunnels is not None" to match the usage in other parts of the code)

One Problem I encountered which is also present in the old code (but because ssh tunnels don't get reestablished is harder to notice) is that the ssh connections execed in Tunnel.connect() get defunced when killed at Tunnel.close()
I think this is because the execed command is something like: "if ssh foo | nc | grep .. then" so it's not a single process and killing doesn't work as expected.

Comment 3 Jeff Gustafson 2012-01-07 00:20:41 UTC
No other news on this issue? I am having the same issue and I am surprised that I don't see more people talking about it. Is there some odd combination that triggers the issue?

Comment 4 Cole Robinson 2012-01-25 16:45:30 UTC
Jeff, There have been a couple other bugs and some mailing list discussion so it's been a pretty popular issue, I just didn't catch this BZ.

Niklas, thanks for the patch. However there was an actual root cause though that has been fixed upstream properly:

http://git.fedorahosted.org/git/?p=virt-manager.git;a=commit;h=becf776d6af3455f6c89396e3ccc330cd2c85434

Closing as UPSTREAM.