[lxc-devel] Change rootfs pinning mechnism

Jäkel, Guido G.Jaekel at dnb.de
Mon Sep 16 08:57:43 UTC 2013


Serge:
> Will it use the same name every time?  Will it eventually go away?

I don’t' know but I expect it will get some ID which represents the file reference on the NFS server. And it "disappear" (, i.e. it will be deleted in the normal way), if the filehandle is closed. Other NFS clients will see this "hidden" file and I expect that they even may open it. This emulation of unlink by a rename try to simulate the stateful behavior of a local file system.


Serge:
>I really don't want a new switch for this.  If we have to do something
>I'd rather detect nfs and do something different.

This would be even more convenient and save, of course.


Christian:
>The only thing I'm not really sure about:
>
>  - fail if it already exists
>         => let's say one has an LXC running somewhere, the power goes out,
>            no UPS, the host reboots after some time, tries to auto-start the
>            LXC on boot but LXC won't start because .lxc-running exists...
>  - perhaps we could write the pid of the lxc-start process in there, so that it may check whether the container is really running?

Good point. If it will hold open while a container is running, then it's a "left-over", if lxc-start detect another ones handle on it. But a file content might be more easy to handle by all kind of other programing languages that may take use of this file and will also work reliable on a shared file system.

Therefore, if something like the PID is written to the file, please also add the hostname, e.g. <pid>@<hostname>




More information about the lxc-devel mailing list