[libvirt] [PATCH 3/3]: Read cmd stdout + stderr in virRun

Cole Robinson crobinso at redhat.com
Thu Oct 30 18:06:35 UTC 2008


The attached patch is my second cut at reading 
stdout and stderr of the command virRun kicks
off. There is no hard limit to the amount of
data we read now, and we use a poll loop to
avoid any possible full buffer issues.

If stdout or stderr had any content, we DEBUG
it, and if the command appears to fail we
return stderr in the error message. So now,
trying to stop a logical pool with active
volumes will return:

$ sudo virsh pool-destroy vgdata
libvir: error : internal error '/sbin/vgchange -an vgdata' exited with non-zero status 5 and signal 0:   Can't deactivate volume group "vgdata" with 2 open logical volume(s)
error: Failed to destroy pool vgdata

Thanks,
Cole

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-virRun-logging-02.patch
Type: text/x-patch
Size: 5051 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081030/743adb53/attachment-0001.bin>


More information about the libvir-list mailing list