Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Storage driver does not report error messages from commands it runs|
|Product:||[Fedora] Fedora||Reporter:||Daniel Berrange <berrange>|
|Component:||libvirt||Assignee:||Daniel Veillard <veillard>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||rawhide||CC:||berrange, crobinso, hbrock|
|Fixed In Version:||Doc Type:||Enhancement|
|Doc Text:||Story Points:||---|
|Last Closed:||2008-12-06 19:49:08 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||461925|
Description Daniel Berrange 2008-09-11 10:20:33 EDT
+++ This bug was initially created as a clone of Bug #461925 +++ Created an attachment (id=316444) Screenshot Description of problem: Error occured while creating a bochs storage volume in a directory storage pool. Version-Release number of selected component (if applicable): libvirt-0.4.5-2.fc10.i386 virt-manager-0.6.0-1.fc10.i386 qemu-0.9.1-10.fc10.i386 How reproducible: 100% Steps to Reproduce: 1. Create a 'dir' storage pool 2. Create a 'bochs' storage volume of max/alloc == 2000/2000 Actual results: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/createvol.py", line 191, in _async_vol_create poolobj = self.vol.install(meter=meter) File "/usr/lib/python2.5/site-packages/virtinst/Storage.py", line 893, in install (self.name, str(e))) RuntimeError: Couldn't create storage volume 'virt-stor-dir-bochs.img': '/usr/bin/qemu-img exited with non-zero status 1 and signal 0' Expected results: no traceback Additional info: * See attached screenshot. * Please advise if additional information/logfiles are needed.
Comment 1 Daniel Berrange 2008-09-11 10:22:18 EDT
The core problem here is that while libvirt can tell qemu-img failed, it is not capturing the data on stderr. We need to make the storage driver capture stderr and include it in the libvirt error message. If this were done we'd get the useful error message qemu-img: Formatting or formatting option not supported for file format 'bochs' indicating bochs support is for 'query & conversion only, not creation of new volumes
Comment 2 Cole Robinson 2008-09-11 11:08:55 EDT
While we are in this code, I would like to see a macro or something to either log or just print to stderr the entire argv we are running. Not just for storage but anything calling virRun.
Comment 3 Daniel Berrange 2008-11-04 06:07:14 EST
Patches posted upstream http://www.redhat.com/archives/libvir-list/2008-October/msg00745.html
Comment 4 Cole Robinson 2008-12-06 19:49:08 EST
This is released as of version 0.5.0: error messages will now contain the full command line of the forked command, as well as the stderr of that command. 0.5.0 is in rawhide and now F10, so closing as CURRENTRELEASE.