[mesos] 01/02: Moved the Docker executor declaration into a header.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.8.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit 1995f63352a5a8c2c8e73adefed708a8620a5d47 Author: Greg Mann AuthorDate: Thu Jul 25 12:17:41 2019 -0700 Moved the Docker executor declaration into a header. This moves the declaration of the Docker executor into the Docker executor header file and moves the code for the Docker executor binary into a new launcher implementation file. This change will enable the Mesos executor driver implementation to make use of the `DockerExecutor` symbol. Review: https://reviews.apache.org/r/71033/ --- src/CMakeLists.txt | 2 +- src/Makefile.am | 3 +- src/docker/CMakeLists.txt| 20 --- src/docker/executor.cpp | 348 +-- src/docker/executor.hpp | 53 ++ src/launcher/CMakeLists.txt | 5 + src/launcher/docker_executor.cpp | 266 ++ 7 files changed, 408 insertions(+), 289 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1d4f541..e1a5980 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -249,6 +249,7 @@ set(CSI_SRC set(DOCKER_SRC docker/docker.cpp + docker/executor.cpp docker/spec.cpp) set(EXECUTOR_SRC @@ -620,7 +621,6 @@ endif () ## add_subdirectory(checks) add_subdirectory(cli) -add_subdirectory(docker) add_subdirectory(examples) add_subdirectory(launcher) add_subdirectory(local) diff --git a/src/Makefile.am b/src/Makefile.am index 5f97523..ba4d453 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1089,6 +1089,7 @@ libmesos_no_3rdparty_la_SOURCES += \ docker/docker.cpp\ docker/docker.hpp\ docker/executor.hpp \ + docker/executor.cpp \ docker/spec.cpp \ examples/flags.hpp \ examples/test_anonymous_module.hpp \ @@ -1809,7 +1810,7 @@ mesos_usage_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_usage_LDADD = libmesos.la $(LDADD) pkglibexec_PROGRAMS += mesos-docker-executor -mesos_docker_executor_SOURCES = docker/executor.cpp +mesos_docker_executor_SOURCES = launcher/docker_executor.cpp mesos_docker_executor_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_docker_executor_LDADD = libmesos.la $(LDADD) diff --git a/src/docker/CMakeLists.txt b/src/docker/CMakeLists.txt deleted file mode 100644 index 1196664..000 --- a/src/docker/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# THE DOCKER EXECUTOR EXECUTABLE. -# -add_executable(mesos-docker-executor executor.cpp) -target_link_libraries(mesos-docker-executor PRIVATE mesos) diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp index ed1b718..642ed65 100644 --- a/src/docker/executor.cpp +++ b/src/docker/executor.cpp @@ -854,291 +854,105 @@ private: }; -class DockerExecutor : public Executor +DockerExecutor::DockerExecutor( +const Owned& docker, +const string& container, +const string& sandboxDirectory, +const string& mappedDirectory, +const Duration& shutdownGracePeriod, +const string& launcherDir, +const map& taskEnvironment, +const Option& defaultContainerDNS, +bool cgroupsEnableCfs) { -public: - DockerExecutor( - const Owned& docker, - const string& container, - const string& sandboxDirectory, - const string& mappedDirectory, - const Duration& shutdownGracePeriod, - const string& launcherDir, - const map& taskEnvironment, - const Option& defaultContainerDNS, - bool cgroupsEnableCfs) - { -process = Owned(new DockerExecutorProcess( -docker, -container, -sandboxDirectory, -mappedDirectory, -shutdownGracePeriod, -
[mesos] 01/02: Moved the Docker executor declaration into a header.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.7.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit 0567b31212105821d0b37ad049228dab6e98ed63 Author: Greg Mann AuthorDate: Thu Jul 25 12:17:41 2019 -0700 Moved the Docker executor declaration into a header. This moves the declaration of the Docker executor into the Docker executor header file and moves the code for the Docker executor binary into a new launcher implementation file. This change will enable the Mesos executor driver implementation to make use of the `DockerExecutor` symbol. Review: https://reviews.apache.org/r/71033/ --- src/CMakeLists.txt | 2 +- src/Makefile.am | 3 +- src/docker/CMakeLists.txt| 20 --- src/docker/executor.cpp | 348 +-- src/docker/executor.hpp | 53 ++ src/launcher/CMakeLists.txt | 5 + src/launcher/docker_executor.cpp | 266 ++ 7 files changed, 408 insertions(+), 289 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5bfc8db..8b3e84a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -242,6 +242,7 @@ set(CSI_SRC set(DOCKER_SRC docker/docker.cpp + docker/executor.cpp docker/spec.cpp) set(EXECUTOR_SRC @@ -599,7 +600,6 @@ endif () ## add_subdirectory(checks) add_subdirectory(cli) -add_subdirectory(docker) add_subdirectory(examples) add_subdirectory(launcher) add_subdirectory(local) diff --git a/src/Makefile.am b/src/Makefile.am index fb2a27e..4e99723 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1006,6 +1006,7 @@ libmesos_no_3rdparty_la_SOURCES += \ common/validation.cpp \ common/values.cpp\ docker/docker.cpp\ + docker/executor.cpp \ docker/spec.cpp \ exec/exec.cpp \ executor/executor.cpp \ @@ -1743,7 +1744,7 @@ mesos_usage_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_usage_LDADD = libmesos.la $(LDADD) pkglibexec_PROGRAMS += mesos-docker-executor -mesos_docker_executor_SOURCES = docker/executor.cpp +mesos_docker_executor_SOURCES = launcher/docker_executor.cpp mesos_docker_executor_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_docker_executor_LDADD = libmesos.la $(LDADD) diff --git a/src/docker/CMakeLists.txt b/src/docker/CMakeLists.txt deleted file mode 100644 index 1196664..000 --- a/src/docker/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# THE DOCKER EXECUTOR EXECUTABLE. -# -add_executable(mesos-docker-executor executor.cpp) -target_link_libraries(mesos-docker-executor PRIVATE mesos) diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp index ed1b718..642ed65 100644 --- a/src/docker/executor.cpp +++ b/src/docker/executor.cpp @@ -854,291 +854,105 @@ private: }; -class DockerExecutor : public Executor +DockerExecutor::DockerExecutor( +const Owned& docker, +const string& container, +const string& sandboxDirectory, +const string& mappedDirectory, +const Duration& shutdownGracePeriod, +const string& launcherDir, +const map& taskEnvironment, +const Option& defaultContainerDNS, +bool cgroupsEnableCfs) { -public: - DockerExecutor( - const Owned& docker, - const string& container, - const string& sandboxDirectory, - const string& mappedDirectory, - const Duration& shutdownGracePeriod, - const string& launcherDir, - const map& taskEnvironment, - const Option& defaultContainerDNS, - bool cgroupsEnableCfs) - { -process = Owned(new DockerExecutorProcess( -docker, -container, -sandboxDirectory, -mappedDirectory, -
[mesos] 01/02: Moved the Docker executor declaration into a header.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.6.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit 02eb0ceb87dadc0a5ac6f6cd9f141347e852fb80 Author: Greg Mann AuthorDate: Thu Jul 25 12:17:41 2019 -0700 Moved the Docker executor declaration into a header. This moves the declaration of the Docker executor into the Docker executor header file and moves the code for the Docker executor binary into a new launcher implementation file. This change will enable the Mesos executor driver implementation to make use of the `DockerExecutor` symbol. Review: https://reviews.apache.org/r/71033/ --- src/CMakeLists.txt | 2 +- src/Makefile.am | 3 +- src/docker/CMakeLists.txt| 20 --- src/docker/executor.cpp | 323 ++- src/docker/executor.hpp | 53 +++ src/launcher/CMakeLists.txt | 5 + src/launcher/docker_executor.cpp | 266 7 files changed, 408 insertions(+), 264 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8cd56bb..232cf86 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -245,6 +245,7 @@ endif () set(DOCKER_SRC docker/docker.cpp + docker/executor.cpp docker/spec.cpp) set(EXECUTOR_SRC @@ -554,7 +555,6 @@ endif () ## add_subdirectory(checks) add_subdirectory(cli) -add_subdirectory(docker) add_subdirectory(examples) add_subdirectory(launcher) add_subdirectory(local) diff --git a/src/Makefile.am b/src/Makefile.am index 98ba106..6e18cde 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -992,6 +992,7 @@ libmesos_no_3rdparty_la_SOURCES += \ common/validation.cpp \ common/values.cpp\ docker/docker.cpp\ + docker/executor.cpp \ docker/spec.cpp \ exec/exec.cpp \ executor/executor.cpp \ @@ -1762,7 +1763,7 @@ mesos_usage_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_usage_LDADD = libmesos.la $(LDADD) pkglibexec_PROGRAMS += mesos-docker-executor -mesos_docker_executor_SOURCES = docker/executor.cpp +mesos_docker_executor_SOURCES = launcher/docker_executor.cpp mesos_docker_executor_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_docker_executor_LDADD = libmesos.la $(LDADD) diff --git a/src/docker/CMakeLists.txt b/src/docker/CMakeLists.txt deleted file mode 100644 index 1196664..000 --- a/src/docker/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# THE DOCKER EXECUTOR EXECUTABLE. -# -add_executable(mesos-docker-executor executor.cpp) -target_link_libraries(mesos-docker-executor PRIVATE mesos) diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp index d5c905d..714ed68 100644 --- a/src/docker/executor.cpp +++ b/src/docker/executor.cpp @@ -847,266 +847,105 @@ private: }; -class DockerExecutor : public Executor +DockerExecutor::DockerExecutor( +const Owned& docker, +const string& container, +const string& sandboxDirectory, +const string& mappedDirectory, +const Duration& shutdownGracePeriod, +const string& launcherDir, +const map& taskEnvironment, +const Option& defaultContainerDNS, +bool cgroupsEnableCfs) { -public: - DockerExecutor( - const Owned& docker, - const string& container, - const string& sandboxDirectory, - const string& mappedDirectory, - const Duration& shutdownGracePeriod, - const string& launcherDir, - const map& taskEnvironment, - const Option& defaultContainerDNS, - bool cgroupsEnableCfs) - { -process = Owned(new DockerExecutorProcess( -docker, -container, -sandboxDirectory, -mappedDirectory, -
[mesos] 01/02: Moved the Docker executor declaration into a header.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.5.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit 68e8655c8fb6dbc41de6afb66a569583b32f78d3 Author: Greg Mann AuthorDate: Thu Jul 25 12:17:41 2019 -0700 Moved the Docker executor declaration into a header. This moves the declaration of the Docker executor into the Docker executor header file and moves the code for the Docker executor binary into a new launcher implementation file. This change will enable the Mesos executor driver implementation to make use of the `DockerExecutor` symbol. Review: https://reviews.apache.org/r/71033/ --- src/CMakeLists.txt | 2 +- src/Makefile.am | 3 +- src/docker/CMakeLists.txt| 20 --- src/docker/executor.cpp | 323 ++- src/docker/executor.hpp | 53 +++ src/launcher/CMakeLists.txt | 5 + src/launcher/docker_executor.cpp | 265 7 files changed, 407 insertions(+), 264 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 865ad59..f911bab 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -212,6 +212,7 @@ set(COMMON_SRC set(DOCKER_SRC docker/docker.cpp + docker/executor.cpp docker/spec.cpp) set(EXECUTOR_SRC @@ -519,7 +520,6 @@ endif () ## add_subdirectory(checks) add_subdirectory(cli) -add_subdirectory(docker) add_subdirectory(examples) add_subdirectory(launcher) add_subdirectory(local) diff --git a/src/Makefile.am b/src/Makefile.am index 3d6751f..30ff894 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -995,6 +995,7 @@ libmesos_no_3rdparty_la_SOURCES += \ common/validation.cpp \ common/values.cpp\ docker/docker.cpp\ + docker/executor.cpp \ docker/spec.cpp \ exec/exec.cpp \ executor/executor.cpp \ @@ -1754,7 +1755,7 @@ mesos_usage_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_usage_LDADD = libmesos.la $(LDADD) pkglibexec_PROGRAMS += mesos-docker-executor -mesos_docker_executor_SOURCES = docker/executor.cpp +mesos_docker_executor_SOURCES = launcher/docker_executor.cpp mesos_docker_executor_CPPFLAGS = $(MESOS_CPPFLAGS) mesos_docker_executor_LDADD = libmesos.la $(LDADD) diff --git a/src/docker/CMakeLists.txt b/src/docker/CMakeLists.txt deleted file mode 100644 index 1196664..000 --- a/src/docker/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# THE DOCKER EXECUTOR EXECUTABLE. -# -add_executable(mesos-docker-executor executor.cpp) -target_link_libraries(mesos-docker-executor PRIVATE mesos) diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp index 0d75801..c930ce0 100644 --- a/src/docker/executor.cpp +++ b/src/docker/executor.cpp @@ -810,266 +810,105 @@ private: }; -class DockerExecutor : public Executor +DockerExecutor::DockerExecutor( +const Owned& docker, +const string& container, +const string& sandboxDirectory, +const string& mappedDirectory, +const Duration& shutdownGracePeriod, +const string& launcherDir, +const map& taskEnvironment, +const Option& defaultContainerDNS, +bool cgroupsEnableCfs) { -public: - DockerExecutor( - const Owned& docker, - const string& container, - const string& sandboxDirectory, - const string& mappedDirectory, - const Duration& shutdownGracePeriod, - const string& launcherDir, - const map& taskEnvironment, - const Option& defaultContainerDNS, - bool cgroupsEnableCfs) - { -process = Owned(new DockerExecutorProcess( -docker, -container, -sandboxDirectory, -mappedDirectory, -