You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2018/08/01 21:00:31 UTC
[2/3] mesos git commit: Added XFS disk isolator files to CMake.
Added XFS disk isolator files to CMake.
This adds an option to turn on the isolator, but that results in a
fatal error because we do not yet check for the required headers and
libraries.
Review: https://reviews.apache.org/r/68093
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1159b487
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1159b487
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1159b487
Branch: refs/heads/master
Commit: 1159b487be504e1dddca7a88ecd694ba2889b77e
Parents: d880195
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Fri Jul 27 11:30:01 2018 -0700
Committer: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Committed: Wed Aug 1 13:58:48 2018 -0700
----------------------------------------------------------------------
cmake/CompilationConfigure.cmake | 10 ++++++++++
src/CMakeLists.txt | 11 ++++++++++-
src/tests/CMakeLists.txt | 5 +++++
3 files changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/1159b487/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index f80c265..e3d654a 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -412,6 +412,16 @@ if (LINUX)
ENABLE_JEMALLOC_ALLOCATOR
"Use jemalloc as memory allocator for the master and agent binaries."
FALSE)
+
+ option(ENABLE_XFS_DISK_ISOLATOR
+ "Whether to enable the XFS disk isolator."
+ FALSE)
+
+ if (ENABLE_XFS_DISK_ISOLATOR)
+ # TODO(andschwa): Check for required headers and libraries.
+ message(FATAL_ERROR
+ "The XFS disk isolator is not yet supported, see MESOS-9117.")
+ endif ()
endif ()
# FREEBSD CONFIGURATION.
http://git-wip-us.apache.org/repos/asf/mesos/blob/1159b487/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8c96b73..0b92253 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -314,6 +314,12 @@ set(LINUX_SRC
slave/containerizer/mesos/provisioner/backends/bind.cpp
slave/containerizer/mesos/provisioner/backends/overlay.cpp)
+if (ENABLE_XFS_DISK_ISOLATOR)
+ list(APPEND LINUX_SRC
+ slave/containerizer/mesos/isolators/xfs/disk.cpp
+ slave/containerizer/mesos/isolators/xfs/utils.cpp)
+endif ()
+
set(LOCAL_SRC
local/local.cpp)
@@ -524,7 +530,10 @@ set_target_properties(
VERSION ${MESOS_PACKAGE_VERSION}
SOVERSION ${MESOS_PACKAGE_SOVERSION})
-target_compile_definitions(mesos PUBLIC USE_CMAKE_BUILD_CONFIG)
+target_compile_definitions(
+ mesos PUBLIC
+ USE_CMAKE_BUILD_CONFIG
+ $<$<BOOL:${ENABLE_XFS_DISK_ISOLATOR}>:ENABLE_XFS_DISK_ISOLATOR>)
target_include_directories(
mesos PUBLIC
http://git-wip-us.apache.org/repos/asf/mesos/blob/1159b487/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index afa6e7a..42e3a0b 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -252,6 +252,11 @@ if (LINUX)
agent_resource_provider_config_api_tests.cpp
storage_local_resource_provider_tests.cpp)
endif ()
+
+ if (ENABLE_XFS_DISK_ISOLATOR)
+ list(APPEND MESOS_TESTS_SRC
+ containerizer/xfs_quota_tests.cpp)
+ endif()
endif ()