You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/05/26 01:25:03 UTC

[1/4] mesos git commit: Windows: Bumped required CMake version to 3.8.0.

Repository: mesos
Updated Branches:
  refs/heads/master 299f6aa0b -> c4df8f7b0


Windows: Bumped required CMake version to 3.8.0.

The 3.7.x series has a bug where it cannot find Visual Studio 2017
tools. See https://gitlab.kitware.com/cmake/cmake/issues/16732

Review: https://reviews.apache.org/r/59557/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d22bbb79
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d22bbb79
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d22bbb79

Branch: refs/heads/master
Commit: d22bbb792f3674248d643a05a3780b31623008bd
Parents: 299f6aa
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Thu May 25 13:29:12 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu May 25 13:29:47 2017 -0700

----------------------------------------------------------------------
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d22bbb79/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ba6dd0..de463fb 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@
 if (NOT WIN32)
   cmake_minimum_required(VERSION 2.8.10)
 else (NOT WIN32)
-  cmake_minimum_required(VERSION 3.7.0)
+  cmake_minimum_required(VERSION 3.8.0)
 endif (NOT WIN32)
 
 project(Mesos)


[4/4] mesos git commit: Windows: Enabled DOCKER and ROOT test filters.

Posted by jo...@apache.org.
Windows: Enabled DOCKER and ROOT test filters.

This flips two test filters on Windows, so that all Docker and Root
tests are now enabled by default on Windows (rather than disabled).

On Windows, everything must be run as Administrator (like root, but
also somewhat different), so all ROOT tests are enabled by default.
The DOCKER filter now has the same behavior on Windows and Linux.

However, since many of the tests affected by these filters are
still not working on Windows, some individual tests have been
disabled.

The main test enabled by this commit is:
`DockerTest.ROOT_DOCKER_Version`.

Review: https://reviews.apache.org/r/59353/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c4df8f7b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c4df8f7b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c4df8f7b

Branch: refs/heads/master
Commit: c4df8f7b0e48e190111ef427080bf3ca5019a25a
Parents: 1724980
Author: John Kordich <jo...@microsoft.com>
Authored: Thu May 25 17:24:10 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu May 25 17:36:40 2017 -0700

----------------------------------------------------------------------
 src/tests/CMakeLists.txt                 |  6 ++++-
 src/tests/containerizer/docker_tests.cpp | 33 +++++++++++++++------------
 src/tests/default_executor_tests.cpp     |  6 +++--
 src/tests/environment.cpp                | 10 ++++----
 src/tests/health_check_tests.cpp         | 16 ++++++++-----
 src/tests/hook_tests.cpp                 | 14 +++++++-----
 src/tests/slave_tests.cpp                |  5 ++--
 7 files changed, 54 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 29a46bd..ee56d2d 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -144,6 +144,11 @@ set(MESOS_TESTS_SRC
   common/type_utils_tests.cpp
   )
 
+set(MESOS_TESTS_SRC
+  ${MESOS_TESTS_SRC}
+  containerizer/docker_tests.cpp
+  )
+
 if (NOT WIN32)
   set(MESOS_TESTS_SRC
     ${MESOS_TESTS_SRC}
@@ -192,7 +197,6 @@ if (NOT WIN32)
     containerizer/cpu_isolator_tests.cpp
     containerizer/docker_containerizer_tests.cpp
     containerizer/docker_spec_tests.cpp
-    containerizer/docker_tests.cpp
     containerizer/environment_secret_isolator_tests.cpp
     containerizer/io_switchboard_tests.cpp
     containerizer/isolator_tests.cpp

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/containerizer/docker_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/docker_tests.cpp b/src/tests/containerizer/docker_tests.cpp
index 3d3c9af..5cabf5a 100644
--- a/src/tests/containerizer/docker_tests.cpp
+++ b/src/tests/containerizer/docker_tests.cpp
@@ -98,7 +98,7 @@ protected:
 
 
 // This test tests the functionality of the docker's interfaces.
-TEST_F(DockerTest, ROOT_DOCKER_interface)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_interface)
 {
   const string containerName = NAME_PREFIX + "-test";
   Resources resources = Resources::parse("cpus:1;mem:512").get();
@@ -265,7 +265,7 @@ TEST_F(DockerTest, ROOT_DOCKER_interface)
 
 
 // This tests our 'docker kill' wrapper.
-TEST_F(DockerTest, ROOT_DOCKER_kill)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_kill)
 {
   const string containerName = NAME_PREFIX + "-test";
   Resources resources = Resources::parse("cpus:1;mem:512").get();
@@ -356,7 +356,7 @@ TEST_F(DockerTest, ROOT_DOCKER_Version)
 }
 
 
-TEST_F(DockerTest, ROOT_DOCKER_CheckCommandWithShell)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_CheckCommandWithShell)
 {
   Owned<Docker> docker = Docker::create(
       tests::flags.docker,
@@ -384,7 +384,7 @@ TEST_F(DockerTest, ROOT_DOCKER_CheckCommandWithShell)
 }
 
 
-TEST_F(DockerTest, ROOT_DOCKER_CheckPortResource)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_CheckPortResource)
 {
   const string containerName = NAME_PREFIX + "-port-resource-test";
 
@@ -450,7 +450,7 @@ TEST_F(DockerTest, ROOT_DOCKER_CheckPortResource)
 }
 
 
-TEST_F(DockerTest, ROOT_DOCKER_CancelPull)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_CancelPull)
 {
   // Delete the test image if it exists.
 
@@ -486,7 +486,7 @@ TEST_F(DockerTest, ROOT_DOCKER_CancelPull)
 
 // This test verifies mounting in a relative host path when running a
 // docker container works.
-TEST_F(DockerTest, ROOT_DOCKER_MountRelativeHostPath)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_MountRelativeHostPath)
 {
   Owned<Docker> docker = Docker::create(
       tests::flags.docker,
@@ -531,7 +531,7 @@ TEST_F(DockerTest, ROOT_DOCKER_MountRelativeHostPath)
 
 // This test verifies mounting in an absolute host path when running a
 // docker container works.
-TEST_F(DockerTest, ROOT_DOCKER_MountAbsoluteHostPath)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_MountAbsoluteHostPath)
 {
   Owned<Docker> docker = Docker::create(
       tests::flags.docker,
@@ -578,7 +578,8 @@ TEST_F(DockerTest, ROOT_DOCKER_MountAbsoluteHostPath)
 // This test verifies mounting in an absolute host path to
 // a relative container path when running a docker container
 // works.
-TEST_F(DockerTest, ROOT_DOCKER_MountRelativeContainerPath)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  DockerTest, ROOT_DOCKER_MountRelativeContainerPath)
 {
   Owned<Docker> docker = Docker::create(
       tests::flags.docker,
@@ -625,7 +626,8 @@ TEST_F(DockerTest, ROOT_DOCKER_MountRelativeContainerPath)
 
 // This test verifies a docker container mounting relative host
 // path to a relative container path fails.
-TEST_F(DockerTest, ROOT_DOCKER_MountRelativeHostPathRelativeContainerPath)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  DockerTest, ROOT_DOCKER_MountRelativeHostPathRelativeContainerPath)
 {
   Owned<Docker> docker = Docker::create(
       tests::flags.docker,
@@ -671,7 +673,7 @@ class DockerImageTest : public MesosTest {};
 
 // This test verifies that docker image constructor is able to read
 // entrypoint and environment from a docker inspect JSON object.
-TEST_F(DockerImageTest, ParseInspectonImage)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerImageTest, ParseInspectonImage)
 {
   JSON::Value inspect = JSON::parse(
     "{"
@@ -789,7 +791,7 @@ TEST_F(DockerImageTest, ParseInspectonImage)
 // /dev/nvidiactl device (present alongside Nvidia GPUs).
 //
 // TODO(bmahler): Avoid needing Nvidia GPUs to test this.
-TEST_F(DockerTest, ROOT_DOCKER_NVIDIA_GPU_DeviceAllow)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_NVIDIA_GPU_DeviceAllow)
 {
   const string containerName = NAME_PREFIX + "-test";
   Resources resources = Resources::parse("cpus:1;mem:512;gpus:1").get();
@@ -847,7 +849,8 @@ TEST_F(DockerTest, ROOT_DOCKER_NVIDIA_GPU_DeviceAllow)
 //
 // TODO(bmahler): Avoid needing Nvidia GPUs to test this and
 // merge this into a more general inspect test.
-TEST_F(DockerTest, ROOT_DOCKER_NVIDIA_GPU_InspectDevices)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  DockerTest, ROOT_DOCKER_NVIDIA_GPU_InspectDevices)
 {
   const string containerName = NAME_PREFIX + "-test";
   Resources resources = Resources::parse("cpus:1;mem:512;gpus:1").get();
@@ -918,7 +921,8 @@ TEST_F(DockerTest, ROOT_DOCKER_NVIDIA_GPU_InspectDevices)
 
 // This tests verifies that a task requiring more than one volume driver (in
 // multiple Volumes) is rejected.
-TEST_F(DockerTest, ROOT_DOCKER_ConflictingVolumeDriversInMultipleVolumes)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  DockerTest, ROOT_DOCKER_ConflictingVolumeDriversInMultipleVolumes)
 {
   Owned<Docker> docker = Docker::create(
       tests::flags.docker,
@@ -955,7 +959,8 @@ TEST_F(DockerTest, ROOT_DOCKER_ConflictingVolumeDriversInMultipleVolumes)
 // This tests verifies that a task requiring more than one volume driver (via
 // Volume.Source.DockerInfo.driver and ContainerInfo.DockerInfo.volume_driver)
 // is rejected.
-TEST_F(DockerTest, ROOT_DOCKER_ConflictingVolumeDrivers)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  DockerTest, ROOT_DOCKER_ConflictingVolumeDrivers)
 {
   Owned<Docker> docker = Docker::create(
       tests::flags.docker,

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/default_executor_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/default_executor_tests.cpp b/src/tests/default_executor_tests.cpp
index 22af7e9..d074c1a 100644
--- a/src/tests/default_executor_tests.cpp
+++ b/src/tests/default_executor_tests.cpp
@@ -1427,7 +1427,8 @@ INSTANTIATE_TEST_CASE_P(
 
 // This test verifies that the default executor can be launched using
 // reserved persistent resources which can be accessed by its tasks.
-TEST_P(PersistentVolumeDefaultExecutor, ROOT_PersistentResources)
+TEST_P_TEMP_DISABLED_ON_WINDOWS(
+    PersistentVolumeDefaultExecutor, ROOT_PersistentResources)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -1569,7 +1570,8 @@ TEST_P(PersistentVolumeDefaultExecutor, ROOT_PersistentResources)
 
 // This test verifies that the default executor mounts the persistent volume
 // in the task container when it is set on a task in the task group.
-TEST_P(PersistentVolumeDefaultExecutor, ROOT_TaskSandboxPersistentVolume)
+TEST_P_TEMP_DISABLED_ON_WINDOWS(
+    PersistentVolumeDefaultExecutor, ROOT_TaskSandboxPersistentVolume)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/environment.cpp
----------------------------------------------------------------------
diff --git a/src/tests/environment.cpp b/src/tests/environment.cpp
index 280b2ca..a7262cd 100644
--- a/src/tests/environment.cpp
+++ b/src/tests/environment.cpp
@@ -265,7 +265,7 @@ class DockerFilter : public TestFilter
 public:
   DockerFilter()
   {
-#ifdef __linux__
+#if defined(__linux__) || defined(__WINDOWS__)
     Try<Owned<Docker>> docker = Docker::create(
         flags.docker,
         flags.docker_socket);
@@ -274,8 +274,8 @@ public:
       dockerError = docker.error();
     }
 #else
-    dockerError = Error("Docker tests not supported on non-Linux systems");
-#endif // __linux__
+    dockerError = Error("Docker tests are not supported on this platform");
+#endif // __linux__ || __WINDOWS__
 
     if (dockerError.isSome()) {
       std::cerr
@@ -618,8 +618,8 @@ public:
   bool disable(const ::testing::TestInfo* test) const
   {
 #ifdef __WINDOWS__
-    // On Windows, `root` does not exist, so we cannot run `ROOT_` tests.
-    return matches(test, "ROOT_");
+    // On Windows, tests are expected to be run as Administrator.
+    return false;
 #else
     Result<string> user = os::user();
     CHECK_SOME(user);

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/health_check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index d45dd80..4e339bf 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -526,7 +526,7 @@ TEST_F(HealthCheckTest, ROOT_HealthyTaskWithContainerImage)
 
 // This test creates a healthy task using the Docker executor and
 // verifies that the healthy status is reported to the scheduler.
-TEST_F(HealthCheckTest, ROOT_DOCKER_DockerHealthyTask)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(HealthCheckTest, ROOT_DOCKER_DockerHealthyTask)
 {
   Shared<Docker> docker(new MockDocker(
       tests::flags.docker, tests::flags.docker_socket));
@@ -715,7 +715,7 @@ TEST_F(HealthCheckTest, HealthyTaskNonShell)
 
 // This test creates a task whose health flaps, and verifies that the
 // health status updates are sent to the framework scheduler.
-TEST_F(HealthCheckTest, HealthStatusChange)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(HealthCheckTest, HealthStatusChange)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -798,7 +798,8 @@ TEST_F(HealthCheckTest, HealthStatusChange)
 // This test creates a task that uses the Docker executor and whose
 // health flaps. It then verifies that the health status updates are
 // sent to the framework scheduler.
-TEST_F(HealthCheckTest, ROOT_DOCKER_DockerHealthStatusChange)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+    HealthCheckTest, ROOT_DOCKER_DockerHealthStatusChange)
 {
   Shared<Docker> docker(new MockDocker(
       tests::flags.docker, tests::flags.docker_socket));
@@ -1829,7 +1830,8 @@ TEST_F(HealthCheckTest, ROOT_INTERNET_CURL_HealthyTaskViaTCPWithContainerImage)
 
 // Tests a healthy docker task via HTTP. To emulate a task responsive
 // to HTTP health checks, starts Netcat in the docker "alpine" image.
-TEST_F(HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaHTTP)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+    HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaHTTP)
 {
   Shared<Docker> docker(new MockDocker(
       tests::flags.docker, tests::flags.docker_socket));
@@ -1959,7 +1961,8 @@ TEST_F(HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaHTTP)
 // Tests a healthy docker task via HTTPS. To emulate a task responsive
 // to HTTPS health checks, starts an HTTPS server in the docker
 // "haosdent/https-server" image.
-TEST_F(HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaHTTPS)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+    HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaHTTPS)
 {
   Shared<Docker> docker(new MockDocker(
       tests::flags.docker, tests::flags.docker_socket));
@@ -2094,7 +2097,8 @@ TEST_F(HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaHTTPS)
 //
 // NOTE: This test is almost identical to ROOT_DOCKER_DockerHealthyTaskViaHTTP
 // with the difference being TCP health check.
-TEST_F(HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaTCP)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+    HealthCheckTest, ROOT_DOCKER_DockerHealthyTaskViaTCP)
 {
   Shared<Docker> docker(new MockDocker(
       tests::flags.docker, tests::flags.docker_socket));

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/hook_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hook_tests.cpp b/src/tests/hook_tests.cpp
index 02d8f80..f051fae 100644
--- a/src/tests/hook_tests.cpp
+++ b/src/tests/hook_tests.cpp
@@ -639,7 +639,8 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(HookTest, VerifySlaveTaskStatusDecorator)
 
 // This test verifies that the slave pre-launch docker environment
 // decorator can attach environment variables to a task exclusively.
-TEST_F(HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerTaskExecutorDecorator)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerTaskExecutorDecorator)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -747,7 +748,8 @@ TEST_F(HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerTaskExecutorDecorator)
 // This test verifies that the slave pre-launch docker validator hook can check
 // labels on a task and subsequently prevent the task from being launched
 // if a specific label is present.
-TEST_F(HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerValidator)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerValidator)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -841,7 +843,8 @@ TEST_F(HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerValidator)
 // directory. When the docker container launched, the sandbox directory
 // is mounted to the docker container. We validate the hook by verifying
 // the "foo" file exists in the docker container or not.
-TEST_F(HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerHook)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerHook)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -965,7 +968,7 @@ TEST_F(HookTest, ROOT_DOCKER_VerifySlavePreLaunchDockerHook)
 // will try to delete that file in the sandbox directory. We validate
 // the hook by verifying that "post_fetch_hook" file does not exist in
 // the sandbox when container is running.
-TEST_F(HookTest, ROOT_DOCKER_VerifySlavePostFetchHook)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(HookTest, ROOT_DOCKER_VerifySlavePostFetchHook)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -1074,8 +1077,7 @@ TEST_F(HookTest, ROOT_DOCKER_VerifySlavePostFetchHook)
 // Test that the changes made by the resources decorator hook are correctly
 // propagated to the resource offer.
 TEST_F_TEMP_DISABLED_ON_WINDOWS(
-    HookTest,
-    VerifySlaveResourcesAndAttributesDecorator)
+    HookTest, VerifySlaveResourcesAndAttributesDecorator)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index d124d59..b56b014 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -900,7 +900,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(SlaveTest, GetExecutorInfoForTaskWithContainer)
 // MesosContainerizer would fail the launch.
 //
 // TODO(jieyu): Move this test to the mesos containerizer tests.
-TEST_F(SlaveTest, ROOT_LaunchTaskInfoWithContainerInfo)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(SlaveTest, ROOT_LaunchTaskInfoWithContainerInfo)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -986,7 +986,8 @@ TEST_F(SlaveTest, ROOT_LaunchTaskInfoWithContainerInfo)
 // This test runs a command without the command user field set. The
 // command will verify the assumption that the command is run as the
 // slave user (in this case, root).
-TEST_F(SlaveTest, ROOT_RunTaskWithCommandInfoWithoutUser)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+  SlaveTest, ROOT_RunTaskWithCommandInfoWithoutUser)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);


[3/4] mesos git commit: CMake: Added SHA256 hashes for 3rdparty downloads.

Posted by jo...@apache.org.
CMake: Added SHA256 hashes for 3rdparty downloads.

The `ExternalProject_Add` uses this hash to verify the tarballs
automatically. This removes the following warning:

    File will not be verified since no URL_HASH specified

Review: https://reviews.apache.org/r/59536/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/17249803
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/17249803
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/17249803

Branch: refs/heads/master
Commit: 172498032918d131cbb18f40223900851301275b
Parents: 171ba94
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Thu May 25 14:23:37 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu May 25 14:23:37 2017 -0700

----------------------------------------------------------------------
 3rdparty/CMakeLists.txt       | 17 ++++++++++++++++-
 3rdparty/cmake/Versions.cmake | 18 ++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/17249803/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 03f314f..d8658f6 100755
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -159,6 +159,7 @@ ExternalProject_Add(
   BUILD_COMMAND     ${CMAKE_NOOP}
   INSTALL_COMMAND   ${CMAKE_NOOP}
   URL               ${BOOST_URL}
+  URL_HASH          ${BOOST_HASH}
   )
 
 ExternalProject_Add(
@@ -168,6 +169,7 @@ ExternalProject_Add(
   BUILD_COMMAND     ${CMAKE_NOOP}
   INSTALL_COMMAND   ${CMAKE_NOOP}
   URL               ${ELFIO_URL}
+  URL_HASH          ${ELFIO_HASH}
   )
 
 # The patch, configure, build, and install commands are stubbed out on Windows
@@ -183,7 +185,7 @@ ExternalProject_Add(
   BUILD_COMMAND     ${GLOG_BUILD_CMD}
   INSTALL_COMMAND   ${GLOG_INSTALL_CMD}
   URL               ${GLOG_URL}
-  DOWNLOAD_NAME     glog-${GLOG_VERSION}.tar.gz
+  URL_HASH          ${GLOG_HASH}
   )
 
 ExternalProject_Add(
@@ -193,6 +195,7 @@ ExternalProject_Add(
   BUILD_COMMAND     ${CMAKE_NOOP}
   INSTALL_COMMAND   ${CMAKE_NOOP}
   URL               ${PICOJSON_URL}
+  URL_HASH          ${PICOJSON_HASH}
   )
 
 ExternalProject_Add(
@@ -202,6 +205,7 @@ ExternalProject_Add(
   BUILD_COMMAND     ${CMAKE_NOOP}
   INSTALL_COMMAND   ${CMAKE_NOOP}
   URL               ${NVML_URL}
+  URL_HASH          ${NVML_HASH}
   )
 
 ExternalProject_Add(
@@ -211,6 +215,7 @@ ExternalProject_Add(
   PATCH_COMMAND     ${HTTP_PARSER_PATCH_CMD}
   INSTALL_COMMAND   ${CMAKE_NOOP}
   URL               ${HTTP_PARSER_URL}
+  URL_HASH          ${HTTP_PARSER_HASH}
   )
 
 if (NOT ENABLE_LIBEVENT)
@@ -222,6 +227,7 @@ if (NOT ENABLE_LIBEVENT)
     BUILD_COMMAND     ${LIBEV_BUILD_CMD}
     INSTALL_COMMAND   ${LIBEV_INSTALL_CMD}
     URL               ${LIBEV_URL}
+    URL_HASH          ${LIBEV_HASH}
     )
 elseif (ENABLE_LIBEVENT)
   ExternalProject_Add(
@@ -230,6 +236,7 @@ elseif (ENABLE_LIBEVENT)
     CMAKE_ARGS      ${LIBEVENT_CMAKE_ARGS}
     INSTALL_COMMAND ${LIBEVENT_INSTALL_CMD}
     URL             ${LIBEVENT_URL}
+    URL_HASH        ${LIBEVENT_HASH}
     )
 endif (NOT ENABLE_LIBEVENT)
 
@@ -240,6 +247,7 @@ if (WIN32)
     CMAKE_ARGS      -DBUILD_SHARED_LIBS=OFF
     INSTALL_COMMAND ${LIBAPR_INSTALL_CMD}
     URL             ${LIBAPR_URL}
+    URL_HASH        ${LIBAPR_HASH}
     )
 endif (WIN32)
 
@@ -257,6 +265,7 @@ if (WIN32)
     BUILD_COMMAND     msbuild /p:RuntimeLibrary=MT_StaticDebug lib/libcurl.vcxproj
     INSTALL_COMMAND   ${CMAKE_NOOP}
     URL               ${CURL_URL}
+    URL_HASH          ${CURL_HASH}
   )
 
   ExternalProject_Add(
@@ -266,6 +275,7 @@ if (WIN32)
     BUILD_COMMAND   ${GLOG_BUILD_CMD}
     INSTALL_COMMAND ${CMAKE_NOOP}
     URL             ${ZLIB_URL}
+    URL_HASH        ${ZLIB_HASH}
   )
 endif (WIN32)
 
@@ -324,6 +334,7 @@ ExternalProject_Add(
   BUILD_COMMAND     ${GOOGLETEST_BUILD_CMD}
   INSTALL_COMMAND   ${GOOGLETEST_INSTALL_CMD}
   URL               ${GOOGLETEST_URL}
+  URL_HASH          ${GOOGLETEST_HASH}
   )
 
 ExternalProject_Add(
@@ -335,6 +346,7 @@ ExternalProject_Add(
   BUILD_COMMAND     ${PROTOBUF_BUILD_CMD}
   INSTALL_COMMAND   ${PROTOBUF_INSTALL_CMD}
   URL               ${PROTOBUF_URL}
+  URL_HASH          ${PROTOBUF_HASH}
   )
 
 
@@ -384,6 +396,7 @@ if (NOT WIN32)
     BUILD_COMMAND     cd ${ZOOKEEPER_C_ROOT} && make
     INSTALL_COMMAND   cd ${ZOOKEEPER_C_ROOT} && make install
     URL               ${ZOOKEEPER_URL}
+    URL_HASH          ${ZOOKEEPER_HASH}
     )
 elseif (WIN32)
   ExternalProject_Add(
@@ -398,6 +411,7 @@ elseif (WIN32)
     CMAKE_ARGS        -DWANT_CPPUNIT=0
     INSTALL_COMMAND   ${CMAKE_NOOP}
     URL               ${ZOOKEEPER_URL}
+    URL_HASH          ${ZOOKEEPER_HASH}
     )
 endif (NOT WIN32)
 
@@ -417,5 +431,6 @@ if (NOT WIN32)
     BUILD_COMMAND     ${LEVELDB_BUILD_CMD}
     INSTALL_COMMAND   ${CMAKE_NOOP}
     URL               ${LEVELDB_URL}
+    URL_HASH          ${LEVELDB_HASH}
     )
 endif (NOT WIN32)

http://git-wip-us.apache.org/repos/asf/mesos/blob/17249803/3rdparty/cmake/Versions.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/cmake/Versions.cmake b/3rdparty/cmake/Versions.cmake
index d3f572c..a7a1340 100644
--- a/3rdparty/cmake/Versions.cmake
+++ b/3rdparty/cmake/Versions.cmake
@@ -1,22 +1,37 @@
 set(BOOST_VERSION       "1.53.0")
+set(BOOST_HASH          "SHA256=CED7CE2ED8D7D34815AC9DB1D18D28FCD386FFBB3DE6DA45303E1CF193717038")
 set(CURL_VERSION        "7.43.0")
+set(CURL_HASH           "SHA256=1A084DA1EDBFC3BD632861358B26AF45BA91AAADFB15D6482DE55748B8DFC693")
 set(ELFIO_VERSION       "3.2")
+set(ELFIO_HASH          "SHA256=964BE1D401F98FA7A1242BCF048DF32B7D56DBAAAE5D02834900499073AC2E95")
 set(GOOGLETEST_VERSION  "1.8.0")
+set(GOOGLETEST_HASH     "SHA256=58A6F4277CA2BC8565222B3BBD58A177609E9C488E8A72649359BA51450DB7D8")
 set(HTTP_PARSER_VERSION "2.6.2")
+set(HTTP_PARSER_HASH    "SHA256=80FFFC3B64EF6968CECDD4B299A96986007DFF4BD12AE6C58CBCB506959B90AD")
 set(LEVELDB_VERSION     "1.19")
+set(LEVELDB_HASH        "SHA256=7D7A14AE825E66AABEB156C1C3FAE9F9A76D640EF6B40EDE74CC73DA937E5202")
 set(LIBAPR_VERSION      "1.5.2")
+set(LIBAPR_HASH         "SHA256=C173DE748F85A76B5EA7E5C77F3D9F1EECC9C0A6AB91239973062122EA7DD597")
 set(LIBEV_VERSION       "4.22")
+set(LIBEV_HASH          "SHA256=736079E8AC543C74D59AF73F9C52737B3BFEC9601F020BF25A87A4F4D0F01BD6")
 # TODO(hausdorff): (MESOS-3529) transition this back to a non-beta version.
 set(LIBEVENT_VERSION    "2.1.5-beta")
+set(LIBEVENT_HASH       "SHA256=9A410E24921F59F0AB2009E5E31B3B20932E4AA5A1CBAC6A53190DC86DADE806")
 set(NVML_VERSION        "352.79")
+set(NVML_HASH           "SHA256=D0B2CC1742CBD7CC73DA13BFA6BF2DA3D92B545E8388E642D41977F4EAD8D3D0")
 set(PICOJSON_VERSION    "1.3.0")
+set(PICOJSON_HASH       "SHA256=056805CA2691798F5545935A14BB477F2E1D827C9FB862E6E449DBEA22801C7D")
 set(ZLIB_VERSION        "1.2.8")
+set(ZLIB_HASH           "SHA256=36658CB768A54C1D4DEC43C3116C27ED893E88B02ECFCB44F2166F9C0B7F2A0D")
 
 # Platform-dependent versions.
 if (NOT WIN32)
   set(GLOG_VERSION      "0.3.3")
+  set(GLOG_HASH         "SHA256=FBF90C2285BA0561DB7A40F8A4EEFB9AA963E7D399BD450363E959929FE849D0")
   set(PROTOBUF_VERSION  "2.6.1")
+  set(PROTOBUF_HASH     "SHA256=DBBD7BDD2381633995404DE65A945FF1A7610B0DA14593051B4738C90C6DD164")
   set(ZOOKEEPER_VERSION "3.4.8")
+  set(ZOOKEEPER_HASH    "SHA256=F10A0B51F45C4F64C1FE69EF713ABF9EB9571BC7385A82DA892E83BB6C965E90")
 else (NOT WIN32)
   # TODO(hausdorff): (MESOS-3394) Upgrade Windows to use glog v0.3.5 when they
   # release it, as that will contain fixes that will allow us to build glog on
@@ -24,13 +39,16 @@ else (NOT WIN32)
   # Windows builds at a commit hash in the glog history that has all the
   # functionality we want.
   set(GLOG_VERSION      "da816ea70")
+  set(GLOG_HASH         "SHA256=15338EDBE643F3F9A769FBCA34C3AFDF48D8779D800E7F0878A9649A53339F96")
 
   # TODO(hausdorff): (MESOS-3453) this is a patched version of the protobuf
   # library that compiles on Windows. We need to send this as a PR back to the
   # protobuf project.
   set(PROTOBUF_VERSION  "3.0.0-beta-2")
+  set(PROTOBUF_HASH     "SHA256=BE224D07CE87F12E362CFF3DF02851107BF92A4E4604349B1D7A4B1F0C3BFD86")
 
   # The latest release of ZK, 3.4.7, does not compile on Windows. Therefore, we
   # pick a recent commit that does until the next release stabilizes.
   set(ZOOKEEPER_VERSION "3.5.2-alpha")
+  set(ZOOKEEPER_HASH    "SHA256=E4997EE78AAB27628876BCB7BA7FCE8369BA162B1F50D9270A0ED865D11B8310")
 endif (NOT WIN32)


[2/4] mesos git commit: Windows: Updated build documentation.

Posted by jo...@apache.org.
Windows: Updated build documentation.

This (long overdue) documentation update bumps the dependencies
to the correct versions and updates the associated build commands.
Some of the limitations of the Windows work have also been addressed.

Review: https://reviews.apache.org/r/59556/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/171ba944
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/171ba944
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/171ba944

Branch: refs/heads/master
Commit: 171ba9449b6f3470bda77194e84acbe2d2d24cca
Parents: d22bbb7
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Thu May 25 13:37:42 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu May 25 14:18:42 2017 -0700

----------------------------------------------------------------------
 docs/windows.md | 105 +++++++++++++++++++++++++++------------------------
 1 file changed, 56 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/171ba944/docs/windows.md
----------------------------------------------------------------------
diff --git a/docs/windows.md b/docs/windows.md
index b070c64..d596158 100644
--- a/docs/windows.md
+++ b/docs/windows.md
@@ -13,77 +13,84 @@ Mesos 1.0.0 introduced experimental support for Windows.
 
 ### System Requirements
 
-1. Install the latest version of [Visual Studio Community 2015](https://www.visualstudio.com/post-download-vs?sku=community).
-   Make sure to select the Common Tools for Visual C++ and the Windows 10 SDK.
-   Start Visual Studio Community to complete the setup and configuration.
-2. Install [CMake 3.6.3 or later](https://cmake.org/files/v3.6/cmake-3.6.3-win32-x86.msi).
-   Do not run CMake before finishing the Visual Studio Community setup.
-3. Install [Gnu Patch 2.5.9-7 or later](http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-setup.exe).
-4. If building from git, make sure you have Windows-style line endings.
-   i.e. `git config core.autocrlf true`.
-5. Make sure there are no spaces in your build directory.
+1. Install the latest [Visual Studio 2017](https://www.visualstudio.com/downloads/):
+   The "Community" edition is sufficient (and free).
+   During installation, you install either the "Desktop development with C++"
+   workload or choose the following "Individual components":
+    * VC++ 2017 v141 toolset
+    * Windows 10 SDK (10.0.15036.0, currently) for Desktop C++
+    * Windows Universal CRT SDK
+    * Windows Universal C Runtime
+    * C++ profiling tools (optional, for profiling)
+    * Visual Studio C++ core features (optional, for IDE)
+
+2. Install [CMake 3.8.0](https://cmake.org/download/) or later.
+   During installation, choose to "Add CMake to the system PATH for all users".
+
+3. Install [GNU patch for Windows](http://gnuwin32.sourceforge.net/packages/patch.htm).
+
+4. If building from source, install [Git](https://git-scm.com/download/win).
+   During installation, keep the defaults to "Use Git from the Windows
+   Command Prompt", and "Checkout Windows-style, commit Unix-style
+   line endings" (i.e. `git config core.autocrlf true`).
+
+5. Enable filesystem long path support by running the following
+   in an administrative PowerShell prompt:
+   `Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1`
+   And then reboot.  Alternatively this can be set manually through `regedit`.
+   For more details, see this
+   [MSDN article](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx).
+   NOTE: This requirement is in the process of being deprecated!
+
+6. Make sure there are no spaces in your build directory.
    For example, `C:/Program Files (x86)/mesos` is an invalid build directory.
-6. **Optional**: Install [`python 2.6+`](https://www.python.org/downloads/windows/) and [`virtualenv`](https://pypi.python.org/pypi/virtualenv)
-   This is only necessary when developing Mesos on Windows (specifically for automated linting of python files).
 
-### Build Instructions
-
-Following are the instructions for stock Windows 10 and Windows Server 2012 or newer.
+7. If developing Mesos, install [Python 2](https://www.python.org/downloads/)
+   (not Python 3), in order to use our support scripts (e.g. to post and apply
+   patches, or lint source code).
 
-    # Start a VS2015 x64 Native Tool command prompt.
-    # This can be found by opening VS2015 and looking under the "tools"
-    # menu for "Visual Studio Command Prompt".
 
-    # Change working directory.
-    $ cd mesos
+### Build Instructions
 
-    # If you are developing on Windows, we recommend running the bootstrap.
-    # This requires administrator privileges.
-    $ .\bootstrap.bat
+Following are the instructions for Windows 10.
 
-    # Generate the solution and build.
-    $ .\support\windows-build.bat
+    # Start an administrative session of PowerShell
+    # (required for creating symlinks).
 
-    # Set the `PreferredToolArchitecture` environment variable to `x64`.
-    # NOTE: `PreferredToolArchitecture` can be set system-wide via Control Panel.
-    $ SET PreferredToolArchitecture=x64
+    # Clone (or extract) Mesos.
+    git clone https://git-wip-us.apache.org/repos/asf/mesos.git
+    cd mesos
 
-    # After generating the Visual Studio solution you can use the IDE to open
-    # the project and skip this step.
-    $ msbuild Mesos.sln /m
+    # Configure using CMake for an out-of-tree build.
+    mkdir build
+    cd build
+    cmake .. -G "Visual Studio 15 2017 Win64" -T "host=x64" -DENABLE_LIBEVENT=1 -DHAS_AUTHENTICATION=0
 
-    # mesos-agent.exe can be found in the <repository>\build\src folder.
-    $ cd src
+    # Build Mesos.
+    # To build just the Mesos agent, add `--target mesos-agent`.
+    cmake --build .
 
     # The Windows agent exposes new isolators that must be used as with
     # the `--isolation` flag. To get started point the agent to a working
     # master, using eiher an IP address or zookeeper information.
-    $ mesos-agent.exe --master=<master> --work_dir=<work folder> --launcher_dir=<repository>\build\src
+    src\mesos-agent.exe --master=<master> --work_dir=<work folder> --launcher_dir=<repository>\build\src
 
 
 ## Known Limitations
 
 The current implementation is known to have the following limitations:
 
-* At this point, only the agent is capable of running on Windows,
-  the Mesos master must run on a Posix machine.
+* Only the agent should be run on Windows.  The Mesos master can be
+  launched, but only for testing as the master does not support
+  high-availability setups on Windows.
 * Due to the 260 character `MAX_PATH` limitation on Windows,
-  it is required to set the configuration option `--launcher_dir`
-  to be a root path, e.g. `C:\`.
-  In addition, the `TASK_ID` that is passed to Mesos should be short,
-  up to about 40 characters. **NOTE**: If you schedule tasks via Marathon,
-  your Marathon task id should be up to four characters long since Marathon
-  generates Mesos `TASK_ID` by appending a UUID (36 characters) onto
-  the Marathon task id.
-* Currently runs as Administrator (mainly due to symlinks).
-* Only the `MesosContainerizer` is currently supported,
-  which does not provide resource isolation on Windows.
-  Resource isolation will be provided via the `DockerContainerizer`
-  (e.g. Windows Containers) in the future.
-* Most of the tests are not ported to Windows.
+  it is required to enable the NTFS long path support.
+* The Mesos agent must be run as Administrator, mainly due to symlinks.
+* The `MesosContainerizer` currently does not provide any actual
+  resource isolation (similar to running the Mesos agent on POSIX).
 
 
 ## Status
 
 For more information regarding the status of Windows support in Mesos,
-please refer to the [Jira epic](https://issues.apache.org/jira/browse/MESOS-3094).
+please refer to the [Jira epic](https://issues.apache.org/jira/browse/MESOS-3094).
\ No newline at end of file