Bug 509985

Summary: virt-manager: Traceback in populate_migrate_menu
Product: Red Hat Enterprise Linux 5 Reporter: Qunfang Zhang <qzhang>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: crobinso, jialiu, lihuang, lscalabr, tao, xen-maint, yoyzhang
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: 2010-03-30 08:51:01 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
Error
none
Backport of migrate dialog from upstream none

Description Qunfang Zhang 2009-07-07 09:56:33 UTC
Created attachment 350764 [details]
Error

Description of problem:
"Automatically open consoles" can bring a error  when virt-manager restart.Just like the Steps to Reproduce.

Version-Release number of selected component (if applicable):
RHEL5.4-Server-x86_64(2.6.18-156.el5xen)
# rpm -qa | grep -E "libvirt |virt-manager|xen" 
virt-manager-0.6.1-5.el5
xen-3.0.3-88.el5
kernel-xen-2.6.18-156.el5
xen-libs-3.0.3-88.el5
xen-libs-3.0.3-88.el5
kernel-xen-devel-2.6.18-156.el5  

How reproducible:
100%

Steps to Reproduce:
1.Launch virt-manager
2.Click Edit->Preference on Virtual Machine Manager window.
3.Click VM Details on Preference window.
4.Select For all domains.
5.Click Close button.
6.Click Edit->Host Details->Overview,and check the Autoconnect on Host Details window.
7.Let all the vms runing and quit virt-manager
8.Launch virt-manager.

Actual result:
A error prompt pops up:Error bringing up domain details:'None Type' object has no attribute 'get_driver'.
Please catch the attachment.

Expected result:The console window can be open 
automatically.


Additional info:

Comment 1 Qunfang Zhang 2009-07-07 10:35:47 UTC
Error Details:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 272, in show_details
    details = vmmDetails(self.get_config(), con.get_vm(uuid), self)
  File "/usr/share/virt-manager/virtManager/details.py", line 329, in __init__
    self.update_widget_states(self.vm, self.vm.status())
  File "/usr/share/virt-manager/virtManager/details.py", line 739, in update_widget_states
    self.set_migrate_menu()
  File "/usr/share/virt-manager/virtManager/details.py", line 686, in set_migrate_menu
    self.engine.populate_migrate_menu(menu, self.control_vm_migrate)
  File "/usr/share/virt-manager/virtManager/engine.py", line 583, in populate_migrate_menu
    conns = self.get_available_migrate_hostnames()
  File "/usr/share/virt-manager/virtManager/engine.py", line 606, in get_available_migrate_hostnames
    driver = self.windowManager.current_connection().get_driver()
AttributeError: 'NoneType' object has no attribute 'get_driver'

Comment 2 Bryan Mason 2009-08-06 16:28:32 UTC
A customer has also reported this issue.  The traceback is the same, but their reproduction steps are slightly different.  They are:

(these are the same)
 1. Execute virt-manager
 2. Click Edit->Preference on Virtual Machine Manager window.
 3. Click VM Details on Preference window.
 4. Select For all domains.
 5. Click Close button.

(this is what's different)
 6. Start guest domain on other terminal (not using virt-manager -- i.e. using
    "virsh start guest_dom").

Comment 4 Cole Robinson 2009-12-13 22:30:19 UTC
I had filed a bug with the same issue, posting my comment here:

If a VM changes state while the details window is open, we attempt to
repopulate the migrate connection menu. However, the population function
erroneously depends on whatever is selected in the main manager view, which can
cause issues like below:

2009-11-12 17:29:56,383 DEBUG    Uncaught Error: Error bringing up domain
details: 'NoneType' object has no attribute 'get_driver' : Traceback (most
recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 272, in
show_details
    details = vmmDetails(self.get_config(), con.get_vm(uuid), self)
  File "/usr/share/virt-manager/virtManager/details.py", line 329, in __init__
    self.update_widget_states(self.vm, self.vm.status())
  File "/usr/share/virt-manager/virtManager/details.py", line 739, in
update_widget_states
    self.set_migrate_menu()
  File "/usr/share/virt-manager/virtManager/details.py", line 686, in
set_migrate_menu
    self.engine.populate_migrate_menu(menu, self.control_vm_migrate)
  File "/usr/share/virt-manager/virtManager/engine.py", line 583, in
populate_migrate_menu
    conns = self.get_available_migrate_hostnames()
  File "/usr/share/virt-manager/virtManager/engine.py", line 606, in
get_available_migrate_hostnames
    driver = self.windowManager.current_connection().get_driver()
AttributeError: 'NoneType' object has no attribute 'get_driver'

Comment 5 Cole Robinson 2009-12-13 22:30:30 UTC
*** Bug 537867 has been marked as a duplicate of this bug. ***

Comment 6 Cole Robinson 2009-12-15 19:20:41 UTC
Created attachment 378587 [details]
Backport of migrate dialog from upstream

This traceback should be fixed with the backported migrate dialog, which helps solve a number of bugs.

Comment 7 Cole Robinson 2009-12-15 19:41:35 UTC
Fix built in virt-manager-0_6_1-9_el5

Comment 13 errata-xmlrpc 2010-03-30 08:51:01 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-2010-0281.html