Bug 1219443 - virt-manager 1.2.0 is unable to list VMs on hosts with old libvirt
Summary: virt-manager 1.2.0 is unable to list VMs on hosts with old libvirt
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
: 1227111 (view as bug list)
Depends On:
Blocks: 1219629
TreeView+ depends on / blocked
 
Reported: 2015-05-07 11:34 UTC by Michał Kępień
Modified: 2015-06-05 21:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1219629 (view as bug list)
Environment:
Last Closed: 2015-05-07 15:11:58 UTC
Embargoed:


Attachments (Terms of Use)
Proposed patch (466 bytes, patch)
2015-05-07 11:34 UTC, Michał Kępień
no flags Details | Diff

Description Michał Kępień 2015-05-07 11:34:52 UTC
Created attachment 1023080 [details]
Proposed patch

Description of problem:
virt-manager 1.2.0 fails to list VMs when host's libvirt does not support the virConnectListAllDomains() call.

Version-Release number of selected component (if applicable):
1.2.0

How reproducible:
Always

Steps to Reproduce:
1. Use virt-manager 1.2.0 to connect to a host using libvirt version <0.9.13 (e.g. RHEL 5.x).

Actual results:
An error message stating "Error polling connection '<libvirt-URI>': 0" is displayed.

Expected results:
VMs on the selected host should be listed.

Additional info:
I believe this is caused by the changes to virtinst/pollhelpers.py introduced in commit 838baf6 - _new_poll_helper() and _old_poll_helper() are modified, but not _old_fetch_vms(), which is used for hosts with old libvirt versions. Applying the attached patch fixed the problem for me.

Comment 1 Cole Robinson 2015-05-07 15:11:58 UTC
Thank you for cleaning up my mistake. I've pushed your patch now:

commit c4d26d16a65e0ce6b88323e13669c7c388397d7f
Author: Michał Kępień <michal.kepien>
Date:   Thu May 7 11:10:20 2015 -0400

    pollhelpers: Fix VM polling on old libvirt
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1219443

Comment 2 Cole Robinson 2015-06-05 21:15:08 UTC
*** Bug 1227111 has been marked as a duplicate of this bug. ***


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