[libvirt] [PATCH 4/7] lxc: Improve guest startup error reporting

Eric Blake eblake at redhat.com
Thu Jun 2 20:19:16 UTC 2011


On 06/02/2011 01:40 PM, Cole Robinson wrote:
> Add a simple handshake with the lxc_controller process so we can detect
> process startup failures. We do this by adding a new --handshake cli arg
> to lxc_controller for passing a file descriptor. If the process fails to
> launch, we scrape all output from the logfile and report it to the user.
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
>  src/lxc/lxc_container.c  |    2 +-
>  src/lxc/lxc_container.h  |    1 +
>  src/lxc/lxc_controller.c |   33 +++++++++++++-
>  src/lxc/lxc_driver.c     |  107 +++++++++++++++++++++++++++++++++++++++++++++-
>  4 files changed, 137 insertions(+), 6 deletions(-)
> 

> @@ -1489,6 +1572,12 @@ static int lxcVmStart(virConnectPtr conn,
>      if (virCommandRun(cmd, NULL) < 0)
>          goto cleanup;
>  
> +    if (VIR_CLOSE(handshakefds[1]) < 0) {
> +        virReportSystemError(errno, "%s", _("could not close handshake fd"));
> +        goto cleanup;
> +    }
> +    handshakefds[1] = -1;

This line is redundant; the VIR_CLOSE() above already set this to -1.

ACK with that nit fixed, post-release.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110602/6a916129/attachment-0001.sig>


More information about the libvir-list mailing list