You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2015/09/23 22:47:23 UTC
[2/2] mesos git commit: Made the mount in the bind mount backend a
shared mount.
Made the mount in the bind mount backend a shared mount.
Review: https://reviews.apache.org/r/38684
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/fe17d941
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/fe17d941
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/fe17d941
Branch: refs/heads/master
Commit: fe17d9417e23f46e6d7b9df8d66961bff39b6412
Parents: 811c8bf
Author: Jie Yu <yu...@gmail.com>
Authored: Tue Sep 22 16:52:14 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Sep 23 13:02:42 2015 -0700
----------------------------------------------------------------------
.../containerizer/provisioner/backends/bind.cpp | 27 ++++++++++++++++++++
1 file changed, 27 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/fe17d941/src/slave/containerizer/provisioner/backends/bind.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/provisioner/backends/bind.cpp b/src/slave/containerizer/provisioner/backends/bind.cpp
index 5cd83a6..1fe1746 100644
--- a/src/slave/containerizer/provisioner/backends/bind.cpp
+++ b/src/slave/containerizer/provisioner/backends/bind.cpp
@@ -152,6 +152,33 @@ Future<Nothing> BindBackendProcess::provision(
mount.error());
}
+ // Mark the mount as shared+slave.
+ mount = fs::mount(
+ None(),
+ rootfs,
+ None(),
+ MS_SLAVE,
+ NULL);
+
+ if (mount.isError()) {
+ return Failure(
+ "Failed to mark mount '" + rootfs +
+ "' as a slave mount: " + mount.error());
+ }
+
+ mount = fs::mount(
+ None(),
+ rootfs,
+ None(),
+ MS_SHARED,
+ NULL);
+
+ if (mount.isError()) {
+ return Failure(
+ "Failed to mark mount '" + rootfs +
+ "' as a shared mount: " + mount.error());
+ }
+
return Nothing();
}