Repository: mesos Updated Branches: refs/heads/master 2943cda00 -> bdaa698e5
MESOS-2315 Removed deprecated CommandInfo::ContainerInfo. Review: https://reviews.apache.org/r/40062/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bdaa698e Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bdaa698e Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bdaa698e Branch: refs/heads/master Commit: bdaa698e5fdd41c949bc2fbb372fe96710dc2d0e Parents: 2943cda Author: Vaibhav Khanduja <[email protected]> Authored: Mon Dec 14 21:32:56 2015 -0800 Committer: Adam B <[email protected]> Committed: Mon Dec 14 21:35:33 2015 -0800 ---------------------------------------------------------------------- CHANGELOG | 3 +++ include/mesos/mesos.proto | 21 -------------------- include/mesos/v1/mesos.proto | 21 -------------------- src/slave/containerizer/mesos/containerizer.cpp | 5 ----- src/slave/slave.cpp | 5 ----- src/tests/slave_tests.cpp | 2 -- 6 files changed, 3 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/bdaa698e/CHANGELOG ---------------------------------------------------------------------- diff --git a/CHANGELOG b/CHANGELOG index 2ef8fe6..388b8b9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ Release Notes - Mesos - Version 0.27.0 (WIP) -------------------------------------------- +** API Changes: + * [MESOS-2315] - Removed deprecated CommandInfo::ContainerInfo. + Release Notes - Mesos - Version 0.26.0 -------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/bdaa698e/include/mesos/mesos.proto ---------------------------------------------------------------------- diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto index 8ca2130..28a6985 100644 --- a/include/mesos/mesos.proto +++ b/include/mesos/mesos.proto @@ -367,27 +367,6 @@ message CommandInfo { optional bool cache = 4; } - // Describes a container. - // Not all containerizers currently implement ContainerInfo, so it - // is possible that a launched task will fail due to supplying this - // attribute. - // NOTE: The containerizer API is currently in an early beta or - // even alpha state. Some details, like the exact semantics of an - // "image" or "options" are not yet hardened. - // TODO(tillt): Describe the exact scheme and semantics of "image" - // and "options". - message ContainerInfo { - // URI describing the container image name. - required string image = 1; - - // Describes additional options passed to the containerizer. - repeated string options = 2; - } - - // NOTE: MesosContainerizer does currently not support this - // attribute and tasks supplying a 'container' will fail. - optional ContainerInfo container = 4; - repeated URI uris = 1; optional Environment environment = 2; http://git-wip-us.apache.org/repos/asf/mesos/blob/bdaa698e/include/mesos/v1/mesos.proto ---------------------------------------------------------------------- diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto index 8f357b0..dfb2487 100644 --- a/include/mesos/v1/mesos.proto +++ b/include/mesos/v1/mesos.proto @@ -367,27 +367,6 @@ message CommandInfo { optional bool cache = 4; } - // Describes a container. - // Not all containerizers currently implement ContainerInfo, so it - // is possible that a launched task will fail due to supplying this - // attribute. - // NOTE: The containerizer API is currently in an early beta or - // even alpha state. Some details, like the exact semantics of an - // "image" or "options" are not yet hardened. - // TODO(tillt): Describe the exact scheme and semantics of "image" - // and "options". - message ContainerInfo { - // URI describing the container image name. - required string image = 1; - - // Describes additional options passed to the containerizer. - repeated string options = 2; - } - - // NOTE: MesosContainerizer does currently not support this - // attribute and tasks supplying a 'container' will fail. - optional ContainerInfo container = 4; - repeated URI uris = 1; optional Environment environment = 2; http://git-wip-us.apache.org/repos/asf/mesos/blob/bdaa698e/src/slave/containerizer/mesos/containerizer.cpp ---------------------------------------------------------------------- diff --git a/src/slave/containerizer/mesos/containerizer.cpp b/src/slave/containerizer/mesos/containerizer.cpp index 6dad2e8..8242190 100644 --- a/src/slave/containerizer/mesos/containerizer.cpp +++ b/src/slave/containerizer/mesos/containerizer.cpp @@ -609,11 +609,6 @@ Future<bool> MesosContainerizerProcess::launch( flags.default_container_info.get()); } - // MesosContainerizer does not support ContainerInfo in CommandInfo. - if (executorInfo.command().has_container()) { - return false; - } - LOG(INFO) << "Starting container '" << containerId << "' for executor '" << executorInfo.executor_id() << "' of framework '" << executorInfo.framework_id() << "'"; http://git-wip-us.apache.org/repos/asf/mesos/blob/bdaa698e/src/slave/slave.cpp ---------------------------------------------------------------------- diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp index 9bd86e1..ef86969 100644 --- a/src/slave/slave.cpp +++ b/src/slave/slave.cpp @@ -3543,11 +3543,6 @@ ExecutorInfo Slave::getExecutorInfo( task.command().environment()); } - if (task.command().has_container()) { - executor.mutable_command()->mutable_container()->MergeFrom( - task.command().container()); - } - // We skip setting the user for the command executor that has // a rootfs image since we need root permissions to chroot. // We assume command executor will change to the correct user http://git-wip-us.apache.org/repos/asf/mesos/blob/bdaa698e/src/tests/slave_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp index 4975bea..f191993 100644 --- a/src/tests/slave_tests.cpp +++ b/src/tests/slave_tests.cpp @@ -565,7 +565,6 @@ TEST_F(SlaveTest, GetExecutorInfo) // Now assert that it actually is running mesos-executor without any // bleedover from the command we intend on running. EXPECT_TRUE(executor.command().shell()); - EXPECT_FALSE(executor.command().has_container()); EXPECT_EQ(0, executor.command().arguments_size()); EXPECT_NE(string::npos, executor.command().value().find("mesos-executor")); } @@ -615,7 +614,6 @@ TEST_F(SlaveTest, GetExecutorInfoForTaskWithContainer) EXPECT_TRUE(executor.command().shell()); // CommandInfo.container is not included. In this test the ContainerInfo // must be included in Executor.container (copied from TaskInfo.container). - EXPECT_FALSE(executor.command().has_container()); EXPECT_TRUE(executor.has_container()); EXPECT_EQ("4.3.2.1", executor.container().network_infos(0).ip_address());
