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 2016/08/01 20:29:07 UTC

[1/6] mesos git commit: CMake: Added build script for mesos-local executable.

Repository: mesos
Updated Branches:
  refs/heads/master ca5eaad82 -> 16ac8f939


CMake: Added build script for mesos-local executable.

This executable is used to run a local Mesos cluster
for testing purposes.

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


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

Branch: refs/heads/master
Commit: dac771f1e2fafbf9ad8adfebc491933d64a21d66
Parents: 697b55a
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Thu Jul 28 15:13:42 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 1 13:12:03 2016 -0700

----------------------------------------------------------------------
 src/CMakeLists.txt       |  1 +
 src/local/CMakeLists.txt | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/dac771f1/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 32a8ae2..d4bc0f2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -514,6 +514,7 @@ target_link_libraries(${MESOS_PROTOBUF_TARGET} ${AGENT_LIBS})
 add_subdirectory(docker/)
 add_subdirectory(health-check/)
 add_subdirectory(launcher/)
+add_subdirectory(local/)
 add_subdirectory(master/)
 add_subdirectory(slave/)
 add_subdirectory(slave/containerizer/mesos/)

http://git-wip-us.apache.org/repos/asf/mesos/blob/dac771f1/src/local/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/local/CMakeLists.txt b/src/local/CMakeLists.txt
new file mode 100644
index 0000000..643a6cf
--- /dev/null
+++ b/src/local/CMakeLists.txt
@@ -0,0 +1,42 @@
+# 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.
+
+# TODO(josephw): Enable this on Windows after sorting out the dependencies.
+if (NOT WIN32)
+
+set(MESOS_LOCAL_TARGET mesos-local
+  CACHE STRING "Used to start a local mesos cluster for testing purposes.")
+
+# THE MESOS-LOCAL SOURCE.
+#########################
+set(MESOS_LOCAL_SRC
+  ${MESOS_LOCAL_SRC}
+  main.cpp
+  )
+
+# THE MESOS LOCAL EXECUTABLE.
+#############################
+add_executable(${MESOS_LOCAL_TARGET} ${MESOS_LOCAL_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_LOCAL_TARGET} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_LOCAL_TARGET} ${MESOS_TARGET})
+
+endif (NOT WIN32)


[6/6] mesos git commit: CMake: Fixed typo in target comments.

Posted by jo...@apache.org.
CMake: Fixed typo in target comments.

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


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

Branch: refs/heads/master
Commit: 16ac8f93933d09c122674275e49305007599a649
Parents: 0c2166c
Author: haosdent huang <ha...@gmail.com>
Authored: Mon Aug 1 12:18:27 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 1 13:12:04 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/16ac8f93/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index d34ea40..497f610 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -157,7 +157,7 @@ set(
   MESOS_HEALTH_CHECK mesos-health-check
   CACHE STRING "Target for healt-check")
 
-# Define target for health-master.
+# Define target for master.
 set(
   MESOS_MASTER mesos-master
   CACHE STRING "Target for master")


[5/6] mesos git commit: CMake: Added script to build mesos-execute.

Posted by jo...@apache.org.
CMake: Added script to build mesos-execute.

`mesos-execute` is a utility that can schedule and run
a single task.

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


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

Branch: refs/heads/master
Commit: 0c2166c4e68748a285a680f32b1dbf51d865f245
Parents: 6c9a540
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Thu Jul 28 15:55:48 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 1 13:12:04 2016 -0700

----------------------------------------------------------------------
 src/CMakeLists.txt     |  1 +
 src/cli/CMakeLists.txt | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0c2166c4/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 85bf40f..1286ee0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -511,6 +511,7 @@ target_link_libraries(${MESOS_PROTOBUF_TARGET} ${AGENT_LIBS})
 
 # BUILD THE MESOS EXECUTABLES.
 ##############################
+add_subdirectory(cli/)
 add_subdirectory(docker/)
 add_subdirectory(health-check/)
 add_subdirectory(launcher/)

http://git-wip-us.apache.org/repos/asf/mesos/blob/0c2166c4/src/cli/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt
new file mode 100644
index 0000000..c0120cd
--- /dev/null
+++ b/src/cli/CMakeLists.txt
@@ -0,0 +1,42 @@
+# 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.
+
+# TODO(josephw): Enable this on Windows after sorting out the dependencies.
+if (NOT WIN32)
+
+set(MESOS_EXECUTE_TARGET mesos-execute
+  CACHE STRING "Utility used to schedule and run a command in a mesos cluster.")
+
+# THE MESOS-EXECUTE SOURCE.
+###########################
+set(MESOS_EXECUTE_SRC
+  ${MESOS_EXECUTE_SRC}
+  execute.cpp
+  )
+
+# THE MESOS EXECUTE.
+#######################
+add_executable(${MESOS_EXECUTE_TARGET} ${MESOS_EXECUTE_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_EXECUTE_TARGET} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_EXECUTE_TARGET} ${MESOS_TARGET})
+
+endif (NOT WIN32)


[3/6] mesos git commit: CMake: Added LogrotateContainerLogger companion executable.

Posted by jo...@apache.org.
CMake: Added LogrotateContainerLogger companion executable.

This binary is required for the various `LOGROTATE_*` tests.
For now, this binary is not built on Windows due to some
optimizations made inside the executable.

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


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

Branch: refs/heads/master
Commit: 697b55a733d15a5bdc0a524f062f3dd93263a224
Parents: 7dbc74e
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Thu Jul 28 14:49:41 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 1 13:12:03 2016 -0700

----------------------------------------------------------------------
 src/slave/CMakeLists.txt             | 23 +++++++++++++++++++++++
 src/slave/cmake/SlaveConfigure.cmake |  4 ++++
 2 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/697b55a7/src/slave/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/CMakeLists.txt b/src/slave/CMakeLists.txt
index bb9ad62..33120ac 100644
--- a/src/slave/CMakeLists.txt
+++ b/src/slave/CMakeLists.txt
@@ -21,6 +21,14 @@ set(AGENT_EXECUTABLE_SRC
   main.cpp
   )
 
+# TODO(josephw): Port this to Windows.
+if (NOT WIN32)
+  set(MESOS_LOGROTATE_LOGGER_SRC
+    ${MESOS_LOGROTATE_LOGGER_SRC}
+    container_loggers/logrotate.cpp
+    )
+endif (NOT WIN32)
+
 add_subdirectory(qos_controllers)
 add_subdirectory(resource_estimators)
 
@@ -38,10 +46,25 @@ link_directories(${AGENT_LIB_DIRS})
 #######################
 add_executable(${AGENT_TARGET} ${AGENT_EXECUTABLE_SRC})
 
+if (NOT WIN32)
+  add_executable(${MESOS_LOGROTATE_LOGGER_TARGET} ${MESOS_LOGROTATE_LOGGER_SRC})
+endif (NOT WIN32)
+
 # ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
 ######################################################
 target_link_libraries(${AGENT_TARGET} ${AGENT_LIBS} ${MESOS_TARGET})
 
+if (NOT WIN32)
+  target_link_libraries(${MESOS_LOGROTATE_LOGGER_TARGET}
+    ${AGENT_LIBS}
+    ${MESOS_TARGET}
+    )
+endif (NOT WIN32)
+
 # ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
 ####################################################################
 add_dependencies(${AGENT_TARGET} ${MESOS_TARGET})
+
+if (NOT WIN32)
+  add_dependencies(${MESOS_LOGROTATE_LOGGER_TARGET} ${MESOS_TARGET})
+endif (NOT WIN32)

http://git-wip-us.apache.org/repos/asf/mesos/blob/697b55a7/src/slave/cmake/SlaveConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/SlaveConfigure.cmake b/src/slave/cmake/SlaveConfigure.cmake
index ced5749..b339239 100644
--- a/src/slave/cmake/SlaveConfigure.cmake
+++ b/src/slave/cmake/SlaveConfigure.cmake
@@ -29,6 +29,10 @@ set(RESOURCE_ESTIMATOR_TARGET fixed_resource_estimator
   CACHE STRING "Library containing the fixed resource estimator."
   )
 
+set(MESOS_LOGROTATE_LOGGER_TARGET mesos-logrotate-logger
+  CACHE STRING "Executable used by the logrotate container logger."
+  )
+
 # Define process library dependencies. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.
 ################################################################################


[4/6] mesos git commit: CMake: Removed outdated and commented-out build targets.

Posted by jo...@apache.org.
CMake: Removed outdated and commented-out build targets.

The master is now being built by src/master/CMakeLists.txt.
The `mesos-log` target does not exist and may be added later.


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

Branch: refs/heads/master
Commit: 6c9a540562cad1b0192f4687629068c80f6febaf
Parents: dac771f
Author: Joseph Wu <jo...@apache.org>
Authored: Thu Jul 28 15:32:53 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 1 13:12:04 2016 -0700

----------------------------------------------------------------------
 src/CMakeLists.txt | 13 -------------
 1 file changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/6c9a5405/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d4bc0f2..85bf40f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -525,16 +525,3 @@ add_subdirectory(usage/)
 if (NOT WIN32)
   add_subdirectory(tests/)
 endif (NOT WIN32)
-
-
-# mesos-log
-###############################################################################
-#add_executable(${MESOS_LOG} log/main.cpp)
-#target_link_libraries(${MESOS_LOG} ${PROCESS_AGENT_LIBS})
-#add_dependencies(${MESOS_LOG} ${MESOS_FETCHER})
-
-# mesos-master
-###############################################################################
-#add_executable(${MESOS_MASTER} master/main.cpp)
-#target_link_libraries(${MESOS_MASTER} ${PROCESS_AGENT_LIBS})
-#add_dependencies(${MESOS_MASTER} ${MESOS_FETCHER})


[2/6] mesos git commit: CMake: Added `setns` and `active-user` test helper binaries.

Posted by jo...@apache.org.
CMake: Added `setns` and `active-user` test helper binaries.

These binaries are required for `NsTest.ROOT_setns` and
`SlaveTest.ROOT_RunTaskWithCommandInfoWithoutUser`.

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


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

Branch: refs/heads/master
Commit: 7dbc74efaea3e4ec185bfbd0c503a61ac2a5f1e1
Parents: ca5eaad
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Thu Jul 28 12:37:19 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 1 13:12:03 2016 -0700

----------------------------------------------------------------------
 src/tests/CMakeLists.txt                  | 11 +++++++++++
 src/tests/cmake/MesosTestsConfigure.cmake | 15 ++++++++++++++-
 src/tests/containerizer/CMakeLists.txt    | 20 ++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7dbc74ef/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 3c53063..26defa0 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -16,5 +16,16 @@
 
 include(MesosTestsConfigure)
 
+######################
+set(ACTIVE_USER_TEST_HELPER_SRC
+  ${ACTIVE_USER_TEST_HELPER_SRC}
+  active_user_test_helper.cpp
+  )
+
 add_subdirectory(containerizer/)
+
 # TODO(hausdorff): Add the other tests here.
+
+# THE TEST AND HELPER EXECUTABLEs (generates, e.g., stout_tests, etc., on Linux).
+#################################$###############################################
+add_executable(${ACTIVE_USER_TEST_HELPER_TARGET} ${ACTIVE_USER_TEST_HELPER_SRC})

http://git-wip-us.apache.org/repos/asf/mesos/blob/7dbc74ef/src/tests/cmake/MesosTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/tests/cmake/MesosTestsConfigure.cmake b/src/tests/cmake/MesosTestsConfigure.cmake
index caecce1..3610320 100644
--- a/src/tests/cmake/MesosTestsConfigure.cmake
+++ b/src/tests/cmake/MesosTestsConfigure.cmake
@@ -16,7 +16,20 @@
 
 set(
   CONTAINERIZER_MEMORY_TESTS_TARGET mesos-containerizer-memory_test
-  CACHE STRING "Target we use to refer to tests for mesos containerizer tests")
+  CACHE STRING "Target we use to refer to tests for mesos containerizer tests"
+  )
+
+set(
+  ACTIVE_USER_TEST_HELPER_TARGET active-user-test-helper
+  CACHE STRING "Test helper target required to run tests with a user."
+  )
+
+if (LINUX)
+  set(
+    SETNS_TEST_HELPER_TARGET setns-test-helper
+    CACHE STRING "Test helper target that allows changing the test to its parent namespace."
+    )
+endif (LINUX)
 
 # COMPILER CONFIGURATION.
 #########################

http://git-wip-us.apache.org/repos/asf/mesos/blob/7dbc74ef/src/tests/containerizer/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/CMakeLists.txt b/src/tests/containerizer/CMakeLists.txt
index 41e792a..2c52e43 100644
--- a/src/tests/containerizer/CMakeLists.txt
+++ b/src/tests/containerizer/CMakeLists.txt
@@ -24,6 +24,14 @@ set(CONTAINERIZER_MEMORY_TESTS_SRC
   memory_test_helper.cpp
   )
 
+if (LINUX)
+  set(SETNS_TEST_HELPER_SRC
+    ${SETNS_TEST_HELPER_SRC}
+    setns_test_helper_main.cpp
+    setns_test_helper.cpp
+    )
+endif (LINUX)
+
 # INCLUDE DIRECTIVES FOR CONTAINERIZER TEST BINARY (generates, e.g., -I/path/to/thing
 # on Linux).
 #############################################################################
@@ -38,14 +46,26 @@ link_directories(${CONTAINERIZER_TEST_LIB_DIRS})
 ###########################################################################
 add_executable(${CONTAINERIZER_MEMORY_TESTS_TARGET} ${CONTAINERIZER_MEMORY_TESTS_SRC})
 
+if (LINUX)
+  add_executable(${SETNS_TEST_HELPER_TARGET} ${SETNS_TEST_HELPER_SRC})
+endif (LINUX)
+
 # ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
 ######################################################
 target_link_libraries(${CONTAINERIZER_MEMORY_TESTS_TARGET} ${CONTAINERIZER_TEST_LIBS})
 
+if (LINUX)
+  target_link_libraries(${SETNS_TEST_HELPER_TARGET} ${CONTAINERIZER_TEST_LIBS})
+endif (LINUX)
+
 # ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
 ####################################################################
 add_dependencies(${CONTAINERIZER_MEMORY_TESTS_TARGET} ${CONTAINERIZER_TEST_DEPENDENCIES})
 
+if (LINUX)
+  add_dependencies(${SETNS_TEST_HELPER_TARGET} ${CONTAINERIZER_TEST_DEPENDENCIES})
+endif (LINUX)
+
 # ADD TEST TARGET (runs when you do, e.g., `make check`).
 #########################################################
 add_test(NAME MesosContainerizerMemoryTests COMMAND ${CMAKE_BINARY_DIR}/src/${CONTAINERIZER_MEMORY_TESTS_TARGET})