[lxc-devel] disable container start if lxcfs is not running
Serge Hallyn
serge.hallyn at ubuntu.com
Mon May 11 23:33:57 UTC 2015
Stéphane, before I apply this, do you have any objections?
It seems to me if the container is using this hook, then failing
startup if lxcfs isn't running is right. But it is a change in
behavior.
Quoting Dietmar Maurer (dietmar at proxmox.com):
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
>
> Index: new/share/lxc.mount.hook.in
> ===================================================================
> --- new.orig/share/lxc.mount.hook.in
> +++ new/share/lxc.mount.hook.in
> @@ -15,6 +15,9 @@ if [ -d @LXCFSTARGETDIR@/proc/ ]; then
> [ -e "${LXC_ROOTFS_MOUNT}/proc/$(basename $entry)" ] || continue
> mount -n --bind $entry ${LXC_ROOTFS_MOUNT}/proc/$(basename $entry)
> done
> +else
> + >&2 echo "missing /var/lib/lxcfs/proc/ - lxcfs not running?"
> + exit 1
> fi
>
> # /sys/fs/cgroup files
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list