Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 448885

Summary: virt-manager UI not updated on disconnect/connect to remote host
Product: Red Hat Enterprise Linux 5 Reporter: Alexander Todorov <atodorov>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: crobinso, llim, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 09:42:58 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
screen capture none

Description Alexander Todorov 2008-05-29 09:12:04 UTC
Description of problem:
The UI is not updated which leads to guests being listed multiple times. This is
happening when connecting/disconnecting to a remote connection.

Version-Release number of selected component (if applicable):
virt-manager-0.5.3-8.el5

How reproducible:
100% with steps to reproduce

Steps to Reproduce:
Requires: Remote connection over SSH configured and working
1. Run virt-manager
2. Select 'run unprivileged'
3. The UI shows 2 connections - the local one (running virt-manager on dom0) and
the remote one
4. Connect to the local connection - shows dom0 only because we're running
unprivileged.
5. Connect to the remote connection - shows entries for guests on the remote host
6. Disconnect from the local connection
7. Disconnect from remote connection - at this time the entries in UI are not
cleared. They stay there but are inactive (i.e. can't run a selected guest).
8. Connect to the remote connection - the list of guest entries is doubled. Each
guest appears twice. Each entry can be used to activate the guest.
9. Repeat steps 7-8 - on subsequent connects the list of guests in UI is
multiplied. 

Actual results:
UI shows garbage

Expected results:
UI behaves as expected.

Additional info:
See attached ogg file (469K) showing the procedure.

Comment 1 Alexander Todorov 2008-05-29 09:12:04 UTC
Created attachment 307026 [details]
screen capture

Comment 2 RHEL Program Management 2008-06-02 19:56:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Cole Robinson 2008-06-23 20:33:45 UTC
hmm, bizarre. I actually can't reproduce but I don't have an identical set up.
Is there anything in ~/.virt-manager/virt-manager.log? This is probably just a
poor error path somewhere.

Comment 4 Cole Robinson 2008-06-23 20:38:51 UTC
Hmm I take that back, I can reproduce, it just that running unprivledged is the
key. It is throwing and error so I'll dig into it.

Comment 5 Alexander Todorov 2008-06-24 08:35:41 UTC
virt-manager.log from step 1 to step 8

[Tue, 24 Jun 2008 10:34:34 virt-manager 7016] INFO (virt-manager:126)
Application startup
[Tue, 24 Jun 2008 10:34:34 virt-manager 7019] DEBUG (engine:74) About to connect
to uris ['xen+ssh://root@redbull/', 'xen:///']
[Tue, 24 Jun 2008 10:34:41 virt-manager 7019] DEBUG (connection:293) Scheduling
background open thread for xen:///
[Tue, 24 Jun 2008 10:34:41 virt-manager 7019] DEBUG (connection:300) Background
thread is running
[Tue, 24 Jun 2008 10:34:41 virt-manager 7019] DEBUG (connection:329) Background
open thread complete, scheduling notify
[Tue, 24 Jun 2008 10:34:41 virt-manager 7019] DEBUG (connection:338) Notifying
open result
[Tue, 24 Jun 2008 10:34:41 virt-manager 7019] WARNING (connection:530) Unable to
list inactive domains
[Tue, 24 Jun 2008 10:34:41 virt-manager 7019] DEBUG (manager:408) About to
append vm: Domain-0
[Tue, 24 Jun 2008 10:34:41 virt-manager 7019] DEBUG (manager:398) VM Domain-0
started
[Tue, 24 Jun 2008 10:34:45 virt-manager 7019] DEBUG (connection:293) Scheduling
background open thread for xen+ssh://root@redbull/
[Tue, 24 Jun 2008 10:34:45 virt-manager 7019] DEBUG (connection:300) Background
thread is running
[Tue, 24 Jun 2008 10:34:46 virt-manager 7019] DEBUG (connection:329) Background
open thread complete, scheduling notify
[Tue, 24 Jun 2008 10:34:46 virt-manager 7019] DEBUG (connection:338) Notifying
open result
[Tue, 24 Jun 2008 10:34:46 virt-manager 7019] DEBUG (manager:408) About to
append vm: Domain-0
[Tue, 24 Jun 2008 10:34:46 virt-manager 7019] DEBUG (manager:408) About to
append vm: fedora
[Tue, 24 Jun 2008 10:34:46 virt-manager 7019] DEBUG (manager:408) About to
append vm: boinc
[Tue, 24 Jun 2008 10:34:46 virt-manager 7019] DEBUG (manager:408) About to
append vm: debian
[Tue, 24 Jun 2008 10:34:46 virt-manager 7019] DEBUG (manager:398) VM Domain-0
started
[Tue, 24 Jun 2008 10:34:55 virt-manager 7019] ERROR (virt-manager:132) Traceback
(most recent call last):
  File "/usr/share/virt-manager/virtManager/manager.py", line 514, in
conn_state_changed
    self.conn_refresh_resources(conn)
  File "/usr/share/virt-manager/virtManager/manager.py", line 545, in
conn_refresh_resources
    del self.rows[model.get_value(child, ROW_KEY)]
KeyError: '00000000-0000-0000-0000-000000000000'
None
[Tue, 24 Jun 2008 10:35:06 virt-manager 7019] ERROR (virt-manager:132) Traceback
(most recent call last):
  File "/usr/share/virt-manager/virtManager/manager.py", line 514, in
conn_state_changed
    self.conn_refresh_resources(conn)
  File "/usr/share/virt-manager/virtManager/manager.py", line 545, in
conn_refresh_resources
    del self.rows[model.get_value(child, ROW_KEY)]
KeyError: '00000000-0000-0000-0000-000000000000'
None
[Tue, 24 Jun 2008 10:35:06 virt-manager 7019] DEBUG (connection:293) Scheduling
background open thread for xen+ssh://root@redbull/
[Tue, 24 Jun 2008 10:35:06 virt-manager 7019] DEBUG (connection:300) Background
thread is running
[Tue, 24 Jun 2008 10:35:07 virt-manager 7019] DEBUG (connection:329) Background
open thread complete, scheduling notify
[Tue, 24 Jun 2008 10:35:07 virt-manager 7019] DEBUG (connection:338) Notifying
open result
[Tue, 24 Jun 2008 10:35:07 virt-manager 7019] DEBUG (manager:408) About to
append vm: Domain-0
[Tue, 24 Jun 2008 10:35:07 virt-manager 7019] DEBUG (manager:408) About to
append vm: fedora
[Tue, 24 Jun 2008 10:35:07 virt-manager 7019] DEBUG (manager:408) About to
append vm: boinc
[Tue, 24 Jun 2008 10:35:07 virt-manager 7019] DEBUG (manager:408) About to
append vm: debian
[Tue, 24 Jun 2008 10:35:07 virt-manager 7019] DEBUG (manager:398) VM Domain-0
started


Comment 6 Alexander Todorov 2008-06-24 08:37:43 UTC
The traceback above appears after I disconnect from the remote connection

Comment 8 Cole Robinson 2009-02-13 20:11:02 UTC
The problem here is that the dictionary we use for listing VMs in the manager window isn't specific enough: it only keys off UUID. This is an issue since every xen Dom0 has the same UUID (all zeros), so connecting to two xen connections simultaneously causes issues.

This was fixed upstream a while ago:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-manager--devel/rev/9c4afb8ad1e6
http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-manager--devel/rev/4e7c3f99f0db

Comment 10 Cole Robinson 2009-03-23 19:32:39 UTC
Should be fixed in virt-manager-0.6.1-1.el5. Setting to MODIFIED.

Comment 14 errata-xmlrpc 2009-09-02 09:42:58 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1285.html