[lxc-users] Container startup hook arguments

Kees Bos cornelis.bos at gmail.com
Wed Oct 4 07:13:51 UTC 2017


I'm not using it, but do expect the extra args:

while [ {{ '${#@}' }} -gt 3 ] ; do
   ...
   shift
done

It might be that some users will need the last extra argument (stage:
pre-start|start|post-stop). This is currently not available in the
environment.

I can live without these extra arguments, but will have to update my
scripts.


On di, 2017-10-03 at 14:22 -0500, Serge E. Hallyn wrote:
> Quoting Andrey Repin (anrdaemon at yandex.ru):
> > 
> > Greetings, Serge Hallyn!
> > 
> > > 
> > > Since the start, lxc container startup hooks have gotten some
> > > redundant
> > > information as command line arguments, which is also available as
> > > environment variables.
> > > 
> > > Is anyone making use of that? I'm wondering whether any existing
> > > installations would have broken scripts if we get rid of those.
> > > 
> > > https://github.com/lxc/lxc/issues/1766 is one sensible request to
> > > stsending
> > > these args, and I suspect that CNI binaries will also not like
> > > them.
> > > 
> > > Removing them is probably 3.0 material, as even if noone replies
> > > saying
> > > they use them, our community doesn't exactly work like that...
> > > but it sure would be nice to drop them :) 
> > Consider me +1 to that.
> > If your script needs to know its environment, it should make use of
> > it. Other
> > than that, the extra arguments unexpectedly passed to the hook are
> > always a
> > source for potential confusion.
> Thanks.  "I've never used it" is also useful info :)
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list