[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
one simple little test that i see differing results depending on kernel is 'mkfifo foo ln foo bar'. Heres a test script that demos that, and output on precise, raring, saucy (no containers used). == raring: 3.8.0-27-generic == $ ls -ld . drwxrwxrwt 5 root root 4096 Aug 21 19:16 . $ sudo rm -Rf lower upper mp $ mkdir lower upper mp $ sh -c 'echo hi lower/f1.txt' $ sudo mount -t overlayfs -o lowerdir=/tmp/lower,upperdir=/tmp/upper overlay /tmp/mp $ sh -c 'cd mp touch foo ln foo bar' file link: user: PASS $ sudo sh -c 'cd mp touch foo ln foo bar' file link: root: PASS $ sh -c 'cd mp mkfifo foo ln foo bar' fifo link: user: PASS $ sudo sh -c 'cd mp mkfifo foo ln foo bar' fifo link: user: PASS == saucy: 3.11.0-2-generic == $ ls -ld . drwxrwxrwt 17 root root 32768 Aug 21 15:17 . $ sudo rm -Rf lower upper mp [sudo] password for smoser: $ mkdir lower upper mp $ sh -c 'echo hi lower/f1.txt' $ sudo mount -t overlayfs -o lowerdir=/tmp/lower,upperdir=/tmp/upper overlay /tmp/mp $ sh -c 'cd mp touch foo ln foo bar' file link: user: PASS $ sudo sh -c 'cd mp touch foo ln foo bar' file link: root: PASS $ sh -c 'cd mp mkfifo foo ln foo bar' fifo link: user: PASS $ sudo sh -c 'cd mp mkfifo foo ln foo bar' fifo link: user: PASS == precise: 3.2.0-51-virtual == $ ls -ld . drwxrwxrwt 8 root root 4096 Aug 21 19:18 . $ sudo rm -Rf lower upper mp $ mkdir lower upper mp $ sh -c 'echo hi lower/f1.txt' $ sudo mount -t overlayfs -o lowerdir=/tmp/lower,upperdir=/tmp/upper overlay /tmp/mp $ sh -c 'cd mp touch foo ln foo bar' file link: user: PASS $ sudo sh -c 'cd mp touch foo ln foo bar' file link: root: PASS $ sh -c 'cd mp mkfifo foo ln foo bar' ln: failed to create hard link `bar' = `foo': Operation not permitted fifo link: user: FAIL[1] $ sudo sh -c 'cd mp mkfifo foo ln foo bar' fifo link: user: PASS ** Attachment added: testme.sh https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1214500/+attachment/3781175/+files/testme.sh -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
** No longer affects: lxc (Ubuntu) ** Changed in: linux (Ubuntu) Status: Incomplete = Confirmed ** Changed in: linux (Ubuntu) Importance: Undecided = High -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
Host: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu Saucy Salamander (development branch) Release:13.10 Codename: saucy Linux sidnei-laptop 3.11.0-3-generic #6-Ubuntu SMP Mon Aug 19 14:42:35 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux $ apt-cache policy lxc lxc: Installed: 0.9.0.0~staging~20130819-1713-0ubuntu1~ppa1~saucy1 Candidate: 0.9.0.0~staging~20130819-1713-0ubuntu1~ppa1~saucy1 Version table: *** 0.9.0.0~staging~20130819-1713-0ubuntu1~ppa1~saucy1 0 500 http://ppa.launchpad.net/ubuntu-lxc/daily/ubuntu/ saucy/main amd64 Packages 100 /var/lib/dpkg/status 0.9.0-0ubuntu22 0 500 http://br.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages Guest: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 12.04.2 LTS Release:12.04 Codename: precise -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
** Attachment added: client.py: example socket client https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1214500/+attachment/3779837/+files/client.py -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
Attaching 'serv.py' which mimics behavior of supervisor/http.py in supervisor for setting up the socket, and then implements an 'echo' server. client.py is just a simple client to run and show the problem. One would expect to be able to do this: $ ./serv.py /tmp/my-socket $ ./client.py /tmp/my-socket Received 'Hello, world' The behavior seems to differ between precise and saucy kernels. One thing to note is that on precise kernel and overlayfs, I see: $ sudo rm -f /tmp/my-socket $ ./serv.py /tmp/my-socket Traceback (most recent call last): File ./serv.py, line 22, in module os.link(tempname, socketname) OSError: [Errno 1] Operation not permitted $ sudo rm -f /tmp/my-socket $ sudo ./serv.py /tmp/my-socket $ sudo ./client.py /tmp/my-socket Received 'Hello, world' Ie, this works as root, but not as non-root. ** Attachment added: serv.py: program mimicking supervisor/http.py https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1214500/+attachment/3779836/+files/serv.py -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
I added 'linux' as this is at very least a change in behavior between 12.04 kernel and saucy kernel. ** Also affects: linux (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
Regarding creating the socket as a non-root user - did you chown the directory to your user's uid? I have no problem once I've done that in running the server. I have the same issue with the client: sudo mkdir /mnt2 /upper sudo mount -t overlayfs -o lowerdir=/mnt2,upperdir=/upper none /mnt sudo chown -R ubuntu: /mnt ./serv.py /mnt/sock ./client.py /mnt/sock Traceback (most recent call last): File ./client.py, line 7, in module s.connect(socketname) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 111] Connection refused -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1214500] Re: consistent failure with overlayfs and unix sockets
Oh, never mind, I see - that's on precise. and yes I get the same result all around. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1214500 Title: consistent failure with overlayfs and unix sockets To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1214500/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs