Red Hat Bugzilla – Full Text Bug Listing
|Summary:||0.4.3 in updates-testing doesn't seem to work with ruby-libvirt bindings|
|Product:||[Fedora] Fedora||Reporter:||Chris Lalancette <clalance>|
|Component:||ruby-libvirt||Assignee:||David Lutterkort <lutter>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||9||CC:||apevec, berrange, hbrock, mastahnke|
|Fixed In Version:||0.4.4-1.fc9||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2008-07-01 01:30:20 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Chris Lalancette 2008-06-16 11:34:06 EDT
Description of problem: I started testing libvirt-0.4.3 in an oVirt context, and have run into some problems with it. Specifically, oVirt uses the ruby-libvirt bindings to talk to the libvirt APIs and make calls to libvirtd running on remote machines. The ruby code really just does this: all_pools =  all_pools.concat(conn.list_defined_storage_pools) all_pools.concat(conn.list_storage_pools) And I'm getting: libvir: error : invalid argument in virConnectListDefinedStoragePools refresh_pool Task action processing failed: Libvirt::RetrieveError: Call to function virConnectListDefinedStoragePools failed /usr/share/ovirt-wui/task-omatic/./utils.rb:14:in `list_defined_storage_pools' /usr/share/ovirt-wui/task-omatic/./utils.rb:14:in `all_storage_pools' /usr/share/ovirt-wui/task-omatic/./task_storage.rb:73:in `refresh_pool' /usr/share/ovirt-wui/task-omatic/taskomatic.rb:106 /usr/share/ovirt-wui/task-omatic/taskomatic.rb:88:in `each' /usr/share/ovirt-wui/task-omatic/taskomatic.rb:88 /usr/share/ovirt-wui/task-omatic/taskomatic.rb:67:in `loop' /usr/share/ovirt-wui/task-omatic/taskomatic.rb:67 This same code works in 0.4.2, so something has changed with the way these things are interacting.
Comment 1 Daniel Berrange 2008-06-16 11:43:58 EDT
Please re-run with LIBVIRT_DEBUG=1 environment variable set so that it includes debug output. This should tell us where the invalid argument is coming from.
Comment 2 Chris Lalancette 2008-06-17 04:33:02 EDT
Created attachment 309582 [details] Output from the ruby program with LIBVIRT_DEBUG=1 set I'm attaching the entire output of the program with LIBVIRT_DEBUG=1 set, but I believe the relevant part is: DEBUG: libvirt.c: virConnectListDefinedStoragePools (conn=0xccf1d0, names=0xc26dd0, maxnames=0) libvir: error : invalid argument in virConnectListDefinedStoragePools ./storage.rb:25:in `list_defined_storage_pools': Call to function virConnectListDefinedStoragePools failed (Libvirt::RetrieveError) from ./storage.rb:25:in `create_pool' from ./storage.rb:54 DEBUG: libvirt.c: virConnectClose (conn=0xccf1d0)
Comment 3 Daniel Berrange 2008-06-17 04:46:51 EDT
DEBUG: libvirt.c: virConnectListDefinedStoragePools (conn=0xccf1d0, names=0xc26dd0, maxnames=0) This shows the problem. The ruby bindings should not be using a maxnames value of 0.
Comment 4 Chris Lalancette 2008-06-17 05:17:15 EDT
FYI: I posted a patch for this issue to the libvirt mailing list today. Chris Lalancette
Comment 5 Daniel Veillard 2008-06-17 05:26:00 EDT
Path for the patch in the archive: https://www.redhat.com/archives/libvir-list/2008-June/msg00175.html Daniel
Comment 6 Daniel Veillard 2008-06-17 06:06:44 EDT
IMHO the underlying driver which failed need to be fixed as 0 is an accepted value. Once done applying the patch on the binding to shortcut the function call may be okay as a local optimization (but you loose the argument checkings). Daniel
Comment 7 Chris Lalancette 2008-06-19 04:58:28 EDT
OK. I actually figured out what was really going on here, and I've posted a patch to fix the underlying libvirt problems as well: https://www.redhat.com/archives/libvir-list/2008-June/msg00209.html That being said, I think the patch for the ruby bindings is a good optimization, so I think both patches are useful. Chris Lalancette
Comment 8 David Lutterkort 2008-06-20 16:06:51 EDT
I agree, the patch for ruby-libvirt looks good and I'll commit it shortly.
Comment 9 David Lutterkort 2008-06-20 16:10:07 EDT
I committed the patch with a couple more places to shortcircuit added. Making a release and pushing an update will likely have to wait till next week.
Comment 10 Chris Lalancette 2008-06-21 04:30:54 EDT
Cool, thanks David! Chris Lalancette
Comment 11 Fedora Update System 2008-06-25 05:27:19 EDT
libvirt-0.4.4-1.fc9 has been submitted as an update for Fedora 9
Comment 12 Fedora Update System 2008-06-26 04:29:28 EDT
libvirt-0.4.4-1.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update libvirt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-5736
Comment 13 Fedora Update System 2008-07-01 01:30:13 EDT
libvirt-0.4.4-1.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.