[lxc-devel] [PATCH 2/1] lxc_monitor_open: prepend lxcpath

Serge Hallyn serge.hallyn at ubuntu.com
Tue Feb 19 20:06:48 UTC 2013


Quoting Stéphane Graber (stgraber at ubuntu.com):
> On 02/14/2013 11:30 AM, Serge Hallyn wrote:
> > This is needed for lxc_wait and lxc_monitor to handle lxcpath.  However,
> > the full path name is limited to 108 bytes.  Should we use a md5sum of
> > the lxcpath instead of the path itself?
> 
> 
> I thought of instead using the cgroup name (including group and parent,
> so lxc/group/name) but that wouldn't work as the name isn't guaranteed
> to match that of the container (in the case where we have multiple
> container of the same name in the same group).
> 
> So yeah, md5 of the config path seems like a good idea but I'd prefer we
> only use it when we exceed the 108 bytes limit as I kind of like our
> current path (very easy to read ;)).

Yes, but this is going into an abstract socket name.  No human should
see it.

> 108 chars is very long, even my longest container path is only at 64
> chars: /home/stgraber/data/vm/lxc/lib/tpl-precise-amd64-nh55jb/command

Ok - for now it'll just fail - we should fix it up at some point, but
it's low priority :)  (Though juju does tend to use long container
names)

thanks,
-serge




More information about the lxc-devel mailing list