Re: [PATCH 5/7] lxc: controller: Improve container error reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/02/2011 01:40 PM, Cole Robinson wrote:
> Add a handshake with the cloned container process to try and detect
> if it fails to start.
> 
> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> ---
>  src/lxc/lxc_container.c  |   18 ++++++++++++++----
>  src/lxc/lxc_container.h  |    1 +
>  src/lxc/lxc_controller.c |   17 +++++++++++++++++
>  3 files changed, 32 insertions(+), 4 deletions(-)

Interesting - pipe() in the last patch, and socketpair() in this patch.
 At any rate, the underlying use of the fd pair is the same.

ACK, post-release.

> @@ -630,6 +631,12 @@ lxcControllerRun(virDomainDefPtr def,
>          goto cleanup;
>      }
>  
> +    if (socketpair(PF_UNIX, SOCK_STREAM, 0, containerhandshake) < 0) {
> +        virReportSystemError(errno, "%s",
> +                             _("socketpair failed"));
> +        goto cleanup;
> +    }
> +
>      root = virDomainGetRootFilesystem(def);

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]