[lxc-devel] [Spam-Wahrscheinlichkeit=99]Re: [PATCH] Add mechanism for container to notify host about end of boot

Jäkel, Guido G.Jaekel at dnb.de
Fri Sep 14 07:31:56 UTC 2012


Dear Christian, Stéphane and Serge,

>If we want to have a back-channel, we'd need a socket, ...
> [...]
>On the other hand, it wouldn't be too complicated to have two special files lying around: ...

I'm very pleased about the discussion and efforts to implement such a feature because I already have asked for it in former times. In the one hand, this fifo approach may be used for more than the current task. But in the other hand, it's seems to need a bunch of dependencies.


I wonder, if there might be another way. I'm not familiar with his things, but I watched from the logs that the lxc-start process get noticed of some signals the container init process. In addition, something called lxc_utmp get events via the inotify framework.

What's about using an signal (e.g. SIGUSR1) that some simple kill may send to the containers init process? Is it possible to hook this by the lxc-start?

Or might be a way offered by watching for the event of creation or modification of some file by a simple touch command, which may be called by an init script in a final phase? On my Gentoo environment a  'touch /var/run/foo' inside a container will cause an lxc (debug) log entry like

      lxc-start 1347607452.195 DEBUG    lxc_utmp - got inotify event 256 for foo



Greetings

Guido




More information about the lxc-devel mailing list