[
https://issues.apache.org/jira/browse/MESOS-3430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14744970#comment-14744970
]
haosdent commented on MESOS-3430:
---------------------------------
I use CentOS 7.1 and XFS to test it. The behaviours is strange in CentOS 7.1:
after make --bind sandbox sandbox and mark it as shared, every bind mount point
under sandbox would create two records in /proc/self/mountinfo.
I also could reproduce this through shell
{code}
$ mkdir /tmp/sandbox
$ mkdir /tmp/source
$ mkdir /tmp/sandbox/target
$ mount --bind /tmp/sandbox /tmp/sandbox
$ mount --make-shared /tmp/sandbox
$ mount --bind /tmp/source /tmp/sandbox/target
{code}
{code}
104 38 8:3 /tmp/sandbox /tmp/sandbox rw,relatime shared:1 - xfs /dev/sda3
rw,seclabel,attr2,inode64,noquota
107 104 8:3 /tmp/source /tmp/sandbox/target rw,relatime shared:1 - xfs
/dev/sda3 rw,seclabel,attr2,inode64,noquota
108 38 8:3 /tmp/source /tmp/sandbox/target rw,relatime shared:1 - xfs /dev/sda3
rw,seclabel,attr2,inode64,noquota
{code}
I think it maybe caused by xfs. Need more investigation to xfs.
And a quick way to solve this is to mark the sandbox as slave and then mark the
sandbox as shared.
{code}
diff --git a/src/slave/containerizer/isolators/filesystem/linux.cpp
b/src/slave/containerizer/isolators/filesystem/linux.cpp
index dbdbf87..9149838 100644
--- a/src/slave/containerizer/isolators/filesystem/linux.cpp
+++ b/src/slave/containerizer/isolators/filesystem/linux.cpp
@@ -312,6 +312,13 @@ Future<Option<ContainerPrepareInfo>>
LinuxFilesystemIsolatorProcess::__prepare(
None(),
directory,
None(),
+ MS_SLAVE,
+ NULL);
+
+ mount = fs::mount(
+ None(),
+ directory,
+ None(),
MS_SHARED,
NULL);
{code}
> LinuxFilesystemIsolatorTest.ROOT_PersistentVolumeWithoutRootFilesystem fails
> on CentOS 7.1
> ------------------------------------------------------------------------------------------
>
> Key: MESOS-3430
> URL: https://issues.apache.org/jira/browse/MESOS-3430
> Project: Mesos
> Issue Type: Bug
> Affects Versions: 0.25.0
> Reporter: Marco Massenzio
> Assignee: Michael Park
> Labels: ROOT_Tests, flaky-test
> Attachments: verbose.log
>
>
> Just ran ROOT tests on CentOS 7.1 and had the following failure (clean build,
> just pulled from {{master}}):
> {noformat}
> [ RUN ]
> LinuxFilesystemIsolatorTest.ROOT_PersistentVolumeWithoutRootFilesystem
> ../../src/tests/containerizer/filesystem_isolator_tests.cpp:498: Failure
> (wait).failure(): Failed to clean up an isolator when destroying container
> '366b6d37-b326-4ed1-8a5f-43d483dbbace' :Failed to unmount volume
> '/tmp/LinuxFilesystemIsolatorTest_ROOT_PersistentVolumeWithoutRootFilesystem_KXgvoH/sandbox/volume':
> Failed to unmount
> '/tmp/LinuxFilesystemIsolatorTest_ROOT_PersistentVolumeWithoutRootFilesystem_KXgvoH/sandbox/volume':
> Invalid argument
> ../../src/tests/utils.cpp:75: Failure
> os::rmdir(sandbox.get()): Device or resource busy
> [ FAILED ]
> LinuxFilesystemIsolatorTest.ROOT_PersistentVolumeWithoutRootFilesystem (1943
> ms)
> [----------] 1 test from LinuxFilesystemIsolatorTest (1943 ms total)
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (1951 ms total)
> [ PASSED ] 0 tests.
> [ FAILED ] 1 test, listed below:
> [ FAILED ]
> LinuxFilesystemIsolatorTest.ROOT_PersistentVolumeWithoutRootFilesystem
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)