[lxc-devel] [patch 1/1] fix container find the previously created configuration
Andrian Nord
nightnord at gmail.com
Thu Nov 19 02:08:41 UTC 2009
On Wed, Nov 18, 2009 at 11:29:11PM +0100, Daniel Lezcano wrote:
> I have another suggestion for including multiple configuration easily
> with a small change in lxc:
>
> The -f can accept '-', meaning reading from the standard input. Then
> from the outside:
>
> cat /etc/lxc/template /etc/lxc/foo | lxc-start -f - -n foo
>
> It's flexible and let the user to manage its configuration files as he
> wants and avoid a lot of code in lxc - don't make me wrong, I am not
> against adding code ;)
Heh. I'll open you a very closed secret: you may specify -f
/proc/self/fd/0 and get same result ;). I'm already using similar thing for
parsing log output (as lxc-wait is broken, and I need to sync, when init
is started). It's nice for scripting, but bad for testing/manual
maintaining.
> I think I will revert the modification making the LXCPATH/<name>/config
> -> LXCPATH/<name> and come back to a directory with the config file in
> it and keep this structure for _always_.
And this will hit other group of users, that what to have
all-in-single-file-config ;)
> So we come back to the previous structure (a single configuration file
> in a directory) and this is what you want Andrian no ?
I'm really not wondering about that already, i'm just fighting for
"peace in whole world" and similar things ;)
I've implemented into my init.d script technique I've described here
(with env variable) and now i'm using -f _always_. Only problem is with
manual testing, but aliasing would help here also.
But, still, as for me, such a feature might prove itself as useful... Or
might not ;)
More information about the lxc-devel
mailing list