Hi Serge,
> I'm thinking symbolic link may be the simplest thing to support -
> lxc_container_new() could immediately readlink() to get the real
> container name.
Yes, I agree, I'd find such a thing very useful. However, it should not
only be lxc_container_new but also the utilities not using the API,
such as lxc-start etc.
So the desireable behavior would be, in my eyes:
- _Everywhere_, when resolving a container name, see if the
configuration directory is a symlink. If it is:
- relativ symlink without a /:
use destination as effective container name
- contains / (relative or absolute):
completely resolve path and see if it starts with
the configuration directory
if not -> don't assume anything about the name
(i.e. use the supplied one), but do
follow symlink if possible (as is
currently done)
if so -> strip configuration directory from
path and use the rest as effective
container name
- When showing names (mostly lxc-ls), always show the
real name by default, never the alias. So if /var/lib/lxc
contains the following contents
foo/
bar/
baz -> bar
then lxc-ls should only show foo and bar. An additional
option for also showing aliases (or only showing aliases)
may be useful here.
-- Christian
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel