lxc: /dev/shm is not tmpfs and not world writeable in containers
The lxc-alpine template does not mount /dev/shm so sem_open is broken.
This caused python build to build without sem_open when built in lxc.
testcase for python:
from multiprocessing import Process, Lock
def f(l, i):
l.acquire()
print 'hello world', i
l.release()
if __name__ == '__main__':
lock = Lock()
for num in range(10):
Process(target=f, args=(lock, num)).start()
It might also have caused issues for squark that uses /dev/shm
This was fixed in the template upstream: https://github.com/lxc/lxc/commit/1bdedfacc260545b77e2da557850ba420a0fb12c so edge should have it with lxc-1.0.0.
We need to backport this fix for v2.7 and containers having problems should add the following to the config:
lxc.mount.entry=shm dev/shm tmpfs nodev,nosuid,noexec 0 0
(from redmine: issue id 2745, created on 2014-03-07, closed on 2014-03-07)
- Relations:
- relates #2746 (closed)
- Changesets:
- Revision dd56b238 by Natanael Copa on 2014-03-07T10:23:01Z:
main/lxc: fix /dev/shm in alpine template
fixes #2745