Browse code

Make LXC exec driver compatible with recent LXC where lxc.autodev is enabled by default Update LXC to 1.1.2

Signed-off-by: Alex Samorukov <samm@os2.kiev.ua>

Alex Samorukov authored on 2015/05/02 08:42:53
Showing 2 changed files
... ...
@@ -69,7 +69,7 @@ RUN cd /usr/local/lvm2 \
69 69
 # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
70 70
 
71 71
 # Install lxc
72
-ENV LXC_VERSION 1.0.7
72
+ENV LXC_VERSION 1.1.2
73 73
 RUN mkdir -p /usr/src/lxc \
74 74
 	&& curl -sSL https://linuxcontainers.org/downloads/lxc/lxc-${LXC_VERSION}.tar.gz | tar -v -C /usr/src/lxc/ -xz --strip-components=1
75 75
 RUN cd /usr/src/lxc \
... ...
@@ -46,6 +46,9 @@ lxc.cgroup.devices.allow = {{$allowedDevice.CgroupString}}
46 46
 # Use mnt.putold as per https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/986385
47 47
 lxc.pivotdir = lxc_putold
48 48
 
49
+# lxc.autodev is not compativle with lxc --device switch
50
+lxc.autodev = 0
51
+
49 52
 # NOTICE: These mounts must be applied within the namespace
50 53
 {{if .ProcessConfig.Privileged}}
51 54
 # WARNING: mounting procfs and/or sysfs read-write is a known attack vector.
... ...
@@ -67,11 +70,11 @@ lxc.aa_profile = {{.AppArmorProfile}}
67 67
 {{end}}
68 68
 
69 69
 {{if .ProcessConfig.Tty}}
70
-lxc.mount.entry = {{.ProcessConfig.Console}} {{escapeFstabSpaces $ROOTFS}}/dev/console none bind,rw 0 0
70
+lxc.mount.entry = {{.ProcessConfig.Console}} {{escapeFstabSpaces $ROOTFS}}/dev/console none bind,rw,create=file 0 0
71 71
 {{end}}
72 72
 
73
-lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel "newinstance,ptmxmode=0666,nosuid,noexec" ""}} 0 0
74
-lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel "size=65536k,nosuid,nodev,noexec" ""}} 0 0
73
+lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel "newinstance,ptmxmode=0666,nosuid,noexec,create=dir" ""}} 0 0
74
+lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel "size=65536k,nosuid,nodev,noexec,create=dir" ""}} 0 0
75 75
 
76 76
 {{range $value := .Mounts}}
77 77
 {{$createVal := isDirectory $value.Source}}