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

Stéphane Graber stgraber at ubuntu.com
Tue Feb 19 20:09:55 UTC 2013


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)
> 
> thanks,
> -serge
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130219/7b5bb75c/attachment.pgp>


More information about the lxc-devel mailing list