[lxc-devel] [patch 1/1] fix container find the previously created configuration

Daniel Lezcano dlezcano at fr.ibm.com
Wed Nov 18 22:29:11 UTC 2009


Andrian Nord wrote:
> On Wed, Nov 18, 2009 at 05:33:35PM +0100, Daniel Lezcano wrote:
>> Well, this can be interesting, but we must avoid overkill features, so 
>> that need some clear semantics.
>>
>> You and Michael have a lot of good ideas and I suggest to store these 
>> ideas in the "features request" / lxc category:
>>
>> https://sourceforge.net/tracker/?group_id=163076&atid=826306
>>
> 
> Ha, 'clear semantics' it's something most problematic =). But ok, I'll
> try to summarize and concertize all my ideas on bug-tracker. 

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 ;)

> Last time
> I've seen it, I've thought that it's far long abandoned =)

Yep, it was :)

>>> Why this is harder to implement if you will keep raw config (you can
>>> always grep it, for example) - because, if my patches about variables
>>> and config.include (any news about them, by the way?) 
>> I would like to release a 0.6.4 version before taking more patches.
> 
> Heh, ok.
> 
>> Do you mean override the LXCPATH with an environment variable ?
>>
> 
> Partially yes. I suggest to provide an format for asprintf, like
> LXC_CONFIG="/etc/lxc/%s.conf" or
> LXC_CONFIG="/etc/lxc/%s/config" or
> LXC_CONFIG="/etc/lxc/%s"
> 
> This should be enough for specifying some kind of user-provided
> permanent override of default config layout (via exporting this from
> user's .bashrc, for instance).

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_.

That will be the place where to store different things. eg. lxc-debian 
may copy the rootfs directly in LXCPATH/debian/rootfs and lxc.rootfs 
will point to it. Same for the mount file.

lxc-destroy does an rm -rf of all.

So we come back to the previous structure (a single configuration file 
in a directory) and this is what you want Andrian no ?

Thanks
   -- Daniel




More information about the lxc-devel mailing list