Bug 461930 - Storage driver does not report error messages from commands it runs
Summary: Storage driver does not report error messages from commands it runs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 461925
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-11 14:20 UTC by Daniel Berrangé
Modified: 2008-12-07 00:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-07 00:49:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2008-09-11 14:20:33 UTC
+++ 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 Berrangé 2008-09-11 14:22:18 UTC
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 15:08:55 UTC
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 Berrangé 2008-11-04 11:07:14 UTC
Patches posted upstream

http://www.redhat.com/archives/libvir-list/2008-October/msg00745.html

Comment 4 Cole Robinson 2008-12-07 00:49:08 UTC
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.


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