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/11 20:14:38 UTC
mesos git commit: Layers from Appc store should be the rootfs dir,
not the top level dir.
Repository: mesos
Updated Branches:
refs/heads/master 87de003c6 -> 3d082730b
Layers from Appc store should be the rootfs dir, not the top level dir.
Review: https://reviews.apache.org/r/38284
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3d082730
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3d082730
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3d082730
Branch: refs/heads/master
Commit: 3d082730b136d58f9c7dbdf615b66d904ed447c0
Parents: 87de003
Author: Jie Yu <yu...@gmail.com>
Authored: Thu Sep 10 18:11:28 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri Sep 11 11:11:33 2015 -0700
----------------------------------------------------------------------
src/slave/containerizer/provisioners/appc/store.cpp | 8 +++++++-
src/tests/containerizer/appc_provisioner_tests.cpp | 4 +++-
2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/3d082730/src/slave/containerizer/provisioners/appc/store.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/provisioners/appc/store.cpp b/src/slave/containerizer/provisioners/appc/store.cpp
index 04ab2ad..33f692c 100644
--- a/src/slave/containerizer/provisioners/appc/store.cpp
+++ b/src/slave/containerizer/provisioners/appc/store.cpp
@@ -52,6 +52,11 @@ struct CachedImage
const string& _path)
: manifest(_manifest), id(_id), path(_path) {}
+ string rootfs() const
+ {
+ return path::join(path, "rootfs");
+ }
+
const AppcImageManifest manifest;
// Image ID of the format "sha512-value" where "value" is the hex
@@ -223,11 +228,12 @@ Future<vector<string>> StoreProcess::get(const Image::Appc& image)
if (matches(image, candidate)) {
LOG(INFO) << "Found match for image '" << image.name()
<< "' in the store";
+
// The Appc store current doesn't support dependencies and this is
// enforced by manifest validation: if the image's manifest contains
// dependencies it would fail the validation and wouldn't be stored
// in the store.
- return vector<string>({candidate.path});
+ return vector<string>({candidate.rootfs()});
}
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/3d082730/src/tests/containerizer/appc_provisioner_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/appc_provisioner_tests.cpp b/src/tests/containerizer/appc_provisioner_tests.cpp
index b1be2d8..73c32c1 100644
--- a/src/tests/containerizer/appc_provisioner_tests.cpp
+++ b/src/tests/containerizer/appc_provisioner_tests.cpp
@@ -187,7 +187,9 @@ TEST_F(AppcProvisionerTest, StoreRecover)
EXPECT_EQ(1u, layers.get().size());
ASSERT_SOME(os::realpath(imagePath));
- EXPECT_EQ(os::realpath(imagePath).get(), layers.get().front());
+ EXPECT_EQ(
+ os::realpath(path::join(imagePath, "rootfs")).get(),
+ layers.get().front());
}