You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2015/10/26 22:12:27 UTC

[jira] [Created] (MESOS-3806) 'mount --make-rslave /' does not work as expected on ubuntu 14.04

Jie Yu created MESOS-3806:
-----------------------------

             Summary: 'mount --make-rslave /' does not work as expected on ubuntu 14.04
                 Key: MESOS-3806
                 URL: https://issues.apache.org/jira/browse/MESOS-3806
             Project: Mesos
          Issue Type: Bug
            Reporter: Jie Yu


The linux filesystem isolator rely on 'mount --make-rslve /' to make sure the mounts in the container (in a new mount namespace) does not propagate back  to the host mount namespace.

However, this command does not work as expected on ubuntu 14.04. Here is a simple experiment:

{noformat}
$ cat /proc/self/mountinfo
42 22 8:1 /home/vagrant/tmp /home/vagrant/tmp rw,relatime shared:1 - ext4 /dev/disk/by-uuid/3af531bb-7c15-4e60-b23f-4853c47ccc91 rw,data=ordered
43 42 8:1 /home/vagrant/busybox /home/vagrant/tmp/mnt rw,relatime shared:2 - ext4 /dev/disk/by-uuid/3af531bb-7c15-4e60-b23f-4853c47ccc91 rw,data=ordered

$ sudo unshare -m /bin/bash
# cat /proc/self/mountinfo 
70 45 8:1 /home/vagrant/tmp /home/vagrant/tmp rw,relatime shared:1 - ext4 /dev/disk/by-uuid/3af531bb-7c15-4e60-b23f-4853c47ccc91 rw,data=ordered
71 70 8:1 /home/vagrant/busybox /home/vagrant/tmp/mnt rw,relatime shared:2 - ext4 /dev/disk/by-uuid/3af531bb-7c15-4e60-b23f-4853c47ccc91 rw,data=ordered

# mount --make-rslave /home/vagrant/tmp
# cat /proc/self/mountinfo
70 45 8:1 /home/vagrant/tmp /home/vagrant/tmp rw,relatime master:1 - ext4 /dev/disk/by-uuid/3af531bb-7c15-4e60-b23f-4853c47ccc91 rw,data=ordered
71 70 8:1 /home/vagrant/busybox /home/vagrant/tmp/mnt rw,relatime shared:2 - ext4 /dev/disk/by-uuid/3af531bb-7c15-4e60-b23f-4853c47ccc91 rw,data=ordered
{noformat}

If you repeat the above commands on CentOS, the command works as expected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)