Red Hat Bugzilla – Bug 461930
Storage driver does not report error messages from commands it runs
Last modified: 2008-12-06 19:49:08 EST
+++ This bug was initially created as a clone of Bug #461925 +++
Created an attachment (id=316444)
Description of problem:
Error occured while creating a bochs storage volume in a directory storage pool.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a 'dir' storage pool
2. Create a 'bochs' storage volume of max/alloc == 2000/2000
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
RuntimeError: Couldn't create storage volume 'virt-stor-dir-bochs.img': '/usr/bin/qemu-img exited with non-zero status 1 and signal 0'
* See attached screenshot.
* Please advise if additional information/logfiles are needed.
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
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.
Patches posted upstream
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.