[lxc-devel] [PATCH 1/1] lxc_abstract_unix_connect: accomodate containers started before Oct 28
Stéphane Graber
stgraber at ubuntu.com
Mon Nov 11 19:39:07 UTC 2013
On Mon, Nov 11, 2013 at 12:34:51PM -0600, Serge Hallyn wrote:
>
> commit aae93dd3dd20dd12c6b8f9f0490e2fb877ee3f09 fixed the command socket
> name to use the right pathlen instead of always passing in the max
> socket namelen. However, this breaks lxc-info/lxc-list/etc for
> containers started before that commit. So if the correct command
> sock name doesn't work, try the preexising one.
>
> Note we can probably undo this "after awhile". Maybe in august 2014.
>
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> src/lxc/af_unix.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c
> index ab73963..6f0183d 100644
> --- a/src/lxc/af_unix.c
> +++ b/src/lxc/af_unix.c
> @@ -135,6 +135,9 @@ int lxc_abstract_unix_connect(const char *path)
>
> if (connect(fd, (struct sockaddr *)&addr, offsetof(struct sockaddr_un, sun_path) + len)) {
> int tmp = errno;
> + /* special case to connect to older containers */
> + if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == 0)
> + return fd;
> process_lock();
> close(fd);
> process_unlock();
> --
> 1.8.3.2
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20131111/fd9ca782/attachment.pgp>
More information about the lxc-devel
mailing list