[lxc-devel] [PATCH] Add mechanism for container to notify host about end of boot

Stéphane Graber stgraber at ubuntu.com
Thu Sep 13 21:38:17 UTC 2012


On 12-09-13 05:26 PM, Christian Seiler wrote:
>> I like the idea but haven't looked at the implementation yet as the
>> patch is really quite large. Quickly scanning through I briefly noticed
>> that the copyright headers for the new files are wrong (refer to IBM and
>> Daniel instead of Christian).
> 
> I just copy&pasted them from the other files, most header files I saw
> contained the same copyright. Just tell me what exactly to put there and
> then I'll do that for the next version of the patch.

The license is fine (LGPL v2.1+), just drop the IBM part and replace
Daniel Lezcano by your name.

>> I'm also wondering if we shouldn't try to keep the "protocol" a bit more
>> generic to eventually allow the container to send/receive more than just
>> its status?
> 
> If we want to have a back-channel, we'd need a socket, which makes just
> doing echo RUNNING > /dev/lxc-notify impossible, you'd need a special
> program for that. Having the template scripts dump an additional script
> or upstart job or systemd unit file or whatever in the container when
> creating it seems a lot easier than having to use a special program.

Well, talking to a socket is really easy from the command line too:
echo status STARTING | nc -U /dev/lxc_socket

It's depending on netcat but netcat is part of all distros and even
exists in busybox (in a stripped down version).

> On the other hand, it wouldn't be too complicated to have two special
> files lying around: One for simple status updates using the current text
> interface (easily scriptable, not much hassle to get basic status
> notification functionality right) and a socket that supports an
> extensible (binary?) protocol, which currently also only allows one to
> change the status. But because it's extensible, the interface would
> already be there.
> 
> Christian

-- 
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: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20120913/a8a063b4/attachment.pgp>


More information about the lxc-devel mailing list