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

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


Quoting Stéphane Graber (stgraber at ubuntu.com):
> On 02/19/2013 03:06 PM, Serge Hallyn wrote:
> > 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.
> 
> netstat/lsof does. I know some debugging/monitoring tool also tend to
> show activity on all open sockets and so will show the abstract socket name.
> 
> I agree that we don't explicitly show it in LXC but I don't think it'd
> hurt us or add much complexity to only do the hashing when actually needed.
> 
> >> 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)

I wasn't clear - i'm taking it for granted we'll go this route.

-serge




More information about the lxc-devel mailing list