[lxc-devel] [PATCH] move monitor-fifo and monitor-sock to /run

Dwight Engen dwight.engen at oracle.com
Wed Sep 11 18:19:37 UTC 2013


On Wed, 11 Sep 2013 12:06:47 -0500
Serge Hallyn <serge.hallyn at ubuntu.com> wrote:

> Quoting Dwight Engen (dwight.engen at oracle.com):
> > Moving these files should allow $lxcpath to be a read-only fs.
> 
> Thanks, nice cleanup too.  One concern though -
> lxc_monitor_sock_name() just keeps making a longer and longer path,
> and it's limited to 108 bytes.  Is there any reason not to use an
> abstract unix sock for it? The monitor-fifo doesn't have the length
> restriction so $rundir/lxc/$lxcpath/monitor-fifo is ok for it.

Yeah I thought about that, but going to abstract doesn't actually
give us a bigger sun_path though so its not a huge savings right? It
would mean we could get rid of the "/run" + "/lxc/" == 9 bytes that this
patch adds in the root case (or potentially a lot more with
XDG_RUNTIME_DIR case). Maybe because of XDG_RUNTIME_DIR it does make
sense to do, if you think so let me know and I'll update the patch.

"/monitor-fifo" == 13 so currently that leaves (in the root case):

  108 - 9 - 13 - 1 (null)  --> 85 for lxcpath which isn't great

I guess we can also chop down monitor-fifo to just f :) I think if we
do go abstract we probably still want at least an "lxc/" prefix to
avoid accidental name collisions?




More information about the lxc-devel mailing list