Question about LTP testcase netns_sysfs on RHEL6.7GA
A message that is not in the archive (sent off-list or not yet received): [email protected]
----- Original Message -----
Quoted 11 lines
From: "Guangwen Feng" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Guangwen Feng" <[email protected]>
Sent: Tuesday, 15 December, 2015 4:11:51 AM
Subject: Question about LTP testcasenetns_sysfson RHEL6.7GAHello Jan,
I have a question about LTP test case
netns_sysfson RHEL6.7GA, which may need your confirmation, thanks.
I just can't figure out why "/sys" mounts failed in a namespace on RHEL6.7GA.
I can reproduce it as well. The mount fails with:
mount: none already mounted or /sys busy
mount: according to mtab, sysfs is already mounted on /sys
It looks like sysfs is not mount namespace aware in RHEL6:
# unshare -m umount /sys; mount | grep /sys none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
# ls -la /sys total 4 drwxr-xr-x. 13 root root 0 Dec 15 11:06 . dr-xr-xr-x. 25 root root 4096 Dec 15 11:06 .. drwxr-xr-x. 2 root root 0 Dec 15 11:06 block drwxr-xr-x. 16 root root 0 Dec 15 11:06 bus drwxr-xr-x. 37 root root 0 Dec 15 11:06 class drwxr-xr-x. 4 root root 0 Dec 15 11:06 dev drwxr-xr-x. 10 root root 0 Dec 15 11:06 devices drwxr-xr-x. 4 root root 0 Dec 15 11:06 firmware drwxr-xr-x. 3 root root 0 Dec 15 11:06 fs drwxr-xr-x. 2 root root 0 Dec 15 11:06 hypervisor drwxr-xr-x. 5 root root 0 Dec 15 11:06 kernel drwxr-xr-x. 78 root root 0 Dec 15 11:06 module drwxr-xr-x. 2 root root 0 Dec 15 11:06 power
Adding Matus (and list) to CC.
Regards,
Jan
Quoted 30 lines
The
netns_sysfsfails on my RHEL6.7GA, and reports:netns_sysfs1 TFAIL : sysfs in new namespace does not havedummy_test0interfacenetns_sysfs2 TINFO : sysfs in new namespace should not contain: dummy0netns_sysfs2 TINFO : sysfs in new namespace should not contain: eth0netns_sysfs2 TINFO : sysfs in new namespace should not contain: virbr0netns_sysfs2 TINFO : sysfs in new namespace should not contain: virbr0-nicnetns_sysfs2 TFAIL : sysfs in new namespace has more than lo anddummy_test0interfacesnetns_sysfs3 TPASS : sysfs not affected by a separate namespaceIn fact, the functionality of the test case just works well since via "ip link list" in the namespace I can just get what it expected. I found that it is caused by mount failure on "/sys" in the namespace. However, In comparison, it does mount normally on RHEL7.2GA.
For test, I just created a namespace both on RHEL6.7GA and RHEL7.2GA with
CLONE_NEWNSandCLONE_NEWNETflags, I found that even "/proc" mounts normally both on two systems, but I don't understand why "/sys" mounts unsuccessfully on RHEL6.7GA. Sorry I'm not familiar with LXC, does it mean the implementation of mount or net namespace is not yet complete on RHEL6.7GA? Thanks!Best Regards,
Guangwen Feng