Bug 810161

Summary: openSuSE 12.3 breaks mount namespaces
Product: [openSUSE] openSUSE 12.3 Reporter: Michael Leun <ml>
Component: BasesystemAssignee: E-mail List <bnc-team-screening>
Status: VERIFIED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: ml
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Michael Leun 2013-03-19 07:01:06 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0

mount namespaces broken on openSUSE 12.3, this did work in openSUSE 12 .2.

To test I used exactly the same kernel binary with an 12.2 and an 12.3 installation - it is NO kernel issue.

I used the unshare binary (util-linux) from 12.2 on 12.3 - also does not work - so seems to be some lib?!

Reproducible: Always

Steps to Reproduce:
open two shell sessions, in the first one type

mkdir test
unshare -m /bin/bash
mount -o bind /etc test
mount

Verify, that /etc is bind-mounted to test (seen in directory content and mount output).

In second shell session verify, that neither the contents of /etc appear in directory test, nor output of mount shows the mount bind.
Actual Results:  
on openSuSE 12.3 the mount namespace is not unshared and the new mount is seen globally

Expected Results:  
mount namespace unshared after use of "unshare -m /bin/bash" - mounts done in this new shell not seen outside.
Comment 1 Michael Leun 2013-03-19 21:56:04 UTC
I now learned something about sharedsubtree mounts and that in openSuSE 12.3 (as well as other recent distributions) the system default changed from private mounts to shared mounts.

To make the scenario above work again add an

mount --make-rprivate /

after the unshare call.