This is an automated email from the ASF dual-hosted git repository. qianzhang pushed a commit to branch 1.4.x in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 39af40b9ea89c90dc2f1a7247b418e06ac3fd565 Author: Liangyu Zhao <[email protected]> AuthorDate: Wed Aug 29 11:54:25 2018 -0700 Windows: Enable DockerFetcher in Windows agent. Review: https://reviews.apache.org/r/68455/ --- src/CMakeLists.txt | 3 ++- src/slave/containerizer/mesos/containerizer.cpp | 2 ++ src/uri/fetcher.cpp | 6 +++--- src/uri/fetcher.hpp | 10 +++++----- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 34eafdf..9cef63b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -438,12 +438,12 @@ set(URI_SRC uri/utils.cpp uri/fetchers/copy.cpp uri/fetchers/curl.cpp + uri/fetchers/docker.cpp ) if (NOT WIN32) set(URI_SRC ${URI_SRC} - uri/fetchers/docker.cpp uri/fetchers/hadoop.cpp ) endif () @@ -469,6 +469,7 @@ set(WATCHER_SRC set(WIN32_SRC ${WIN32_SRC} + slave/containerizer/mesos/isolators/docker/runtime.cpp slave/containerizer/mesos/isolators/environment_secret.cpp slave/containerizer/mesos/isolators/filesystem/posix.cpp slave/containerizer/mesos/isolators/filesystem/windows.cpp diff --git a/src/slave/containerizer/mesos/containerizer.cpp b/src/slave/containerizer/mesos/containerizer.cpp index aef9a18..e54fc2d 100644 --- a/src/slave/containerizer/mesos/containerizer.cpp +++ b/src/slave/containerizer/mesos/containerizer.cpp @@ -80,6 +80,7 @@ #include "slave/containerizer/mesos/provisioner/provisioner.hpp" #ifdef __WINDOWS__ +#include "slave/containerizer/mesos/isolators/docker/runtime.hpp" #include "slave/containerizer/mesos/isolators/windows.hpp" #include "slave/containerizer/mesos/isolators/filesystem/windows.hpp" #endif // __WINDOWS__ @@ -336,6 +337,7 @@ Try<MesosContainerizer*> MesosContainerizer::create( {"disk/xfs", &XfsDiskIsolatorProcess::create}, #endif // ENABLE_XFS_DISK_ISOLATOR #else + {"docker/runtime", &DockerRuntimeIsolatorProcess::create}, {"windows/cpu", &WindowsCpuIsolatorProcess::create}, #endif // __WINDOWS__ diff --git a/src/uri/fetcher.cpp b/src/uri/fetcher.cpp index 13c2d54..005b6f7 100644 --- a/src/uri/fetcher.cpp +++ b/src/uri/fetcher.cpp @@ -50,12 +50,12 @@ Try<Owned<Fetcher>> create(const Option<Flags>& _flags) [flags]() { return CurlFetcherPlugin::create(flags); }}, {CopyFetcherPlugin::NAME, [flags]() { return CopyFetcherPlugin::create(flags); }}, + {DockerFetcherPlugin::NAME, + [flags]() { return DockerFetcherPlugin::create(flags); }}, #ifndef __WINDOWS__ - // TODO(dpravat): Enable `Hadoop` and `Docker` plugins. See MESOS-5473. + // TODO(dpravat): Enable `Hadoop` plugin. See MESOS-5473. {HadoopFetcherPlugin::NAME, [flags]() { return HadoopFetcherPlugin::create(flags); }}, - {DockerFetcherPlugin::NAME, - [flags]() { return DockerFetcherPlugin::create(flags); }}, #endif // __WINDOWS__ }; diff --git a/src/uri/fetcher.hpp b/src/uri/fetcher.hpp index 7b91010..6997b41 100644 --- a/src/uri/fetcher.hpp +++ b/src/uri/fetcher.hpp @@ -39,13 +39,13 @@ namespace fetcher { */ class Flags : public virtual CopyFetcherPlugin::Flags, -#ifdef __WINDOWS__ - // TODO(dpravat): Add support for Hadoop and Docker plugins. See MESOS-5473. - public virtual CurlFetcherPlugin::Flags {}; -#else public virtual CurlFetcherPlugin::Flags, - public virtual HadoopFetcherPlugin::Flags, +#ifdef __WINDOWS__ + // TODO(dpravat): Add support for Hadoop plugin. See MESOS-5473. public virtual DockerFetcherPlugin::Flags {}; +#else + public virtual DockerFetcherPlugin::Flags, + public virtual HadoopFetcherPlugin::Flags {}; #endif // __WINDOWS__
