[lxc-devel] [PATCH] clean autodev dir on container exit

Serge Hallyn serge.hallyn at ubuntu.com
Fri Aug 8 18:07:02 UTC 2014


Quoting Jean-Tiare LE BIGOT (jean-tiare.le-bigot at ovh.net):
> 
> 
> On 08/08/2014 06:41 PM, Serge Hallyn wrote:
> >Quoting Stéphane Graber (stgraber at ubuntu.com):
> >>Hello,
> >>
> >>We received this patch on github: https://github.com/lxc/lxc/pull/289.patch
> >>
> >>While it does appear to make sense to me that we don't want cruft piling
> >>up in /dev, especially on systems creating hundreds/thousands of
> >>temporary containers, Serge told me that this may have been done by
> >>design.
> >
> >Right, I wasn't sure whether Michael wanted those to persist.  If not, then
> >great let's apply as is.  If so, then how about if we have lxc check at
> >start time whether the dir already existed - if so it leaves it be, else it
> >removes it at shutdown?
> 
> Or maybe I can just add a check to see if the container has a valid
> configuration path. If it is not valid, container has been created
> via the API AND not persisted, hence not persistent.

Sounds good.  In addition we might want both lxc-destroy and the
auto-cleanup in lxc-start-ephemeral (if needed) to call that cleanup fn.


More information about the lxc-devel mailing list