]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Improve LXC startup error reporting
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 4 Mar 2013 20:47:37 +0000 (20:47 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Mar 2013 18:56:52 +0000 (18:56 +0000)
commit09f5e0123f38dac07a4259d9cea33bd1a293706b
tree7a0951aba9c0381dc41fbae13991ad0c4c8c8156
parentf3d312f6c8eb640b3973e99dd96b96c9b5981235
Improve LXC startup error reporting

Currently we rely on a VIR_ERROR message being logged by the
virRaiseError function to report LXC startup errors. This gives
the right message, but is rather ugly and can be truncated
if lots of log messages are written. Change the LXC controller
to explicitly print any virErrorPtr message to stderr. Then
change the driver to skip over anything that looks like a log
message.

The result is that this

error: Failed to start domain busy
error: internal error guest failed to start: 2013-03-04 19:46:42.846+0000: 1734: info : libvirt version: 1.0.2
2013-03-04 19:46:42.846+0000: 1734: error : virFileLoopDeviceAssociate:600 : Unable to open /root/disk.raw: No such file or directory

changes to

error: Failed to start domain busy
error: internal error guest failed to start: Unable to open /root/disk.raw: No such file or directory
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_controller.c
src/lxc/lxc_process.c