You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2016/04/09 01:52:06 UTC
[2/6] mesos git commit: Add autoconf tests for XFS project quotas.
Add autoconf tests for XFS project quotas.
Review: https://reviews.apache.org/r/44945/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/03137072
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/03137072
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/03137072
Branch: refs/heads/master
Commit: 031370725d05866f98016dfdba8ebf5448067a22
Parents: 548da8f
Author: James Peach <jp...@apache.org>
Authored: Fri Apr 8 13:48:36 2016 -0700
Committer: Jiang Yan Xu <ya...@jxu.me>
Committed: Fri Apr 8 16:46:01 2016 -0700
----------------------------------------------------------------------
configure.ac | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/03137072/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index c693b82..4392909 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,12 +258,19 @@ AC_ARG_ENABLE([tests-install],
[build and install tests and their helper tools
default: no]),
[], [enable_tests_install=no])
-
+# TODO(MESOS-4991): Since network-isolator is an optional feature, it should
+# be enabled with --enable-network-isolator.
AC_ARG_WITH([network-isolator],
AS_HELP_STRING([--with-network-isolator],
[builds the network isolator]),
[], [with_network_isolator=no])
+AC_ARG_ENABLE([xfs-disk-isolator],
+ AS_HELP_STRING([--enable-xfs-disk-isolator],
+ [builds the XFS disk isolator
+ default: no]),
+ [], [enable_xfs_disk_isolator=no])
+
AC_ARG_ENABLE([libevent],
AS_HELP_STRING([--enable-libevent],
[use libevent instead of libev default: no]),
@@ -938,6 +945,52 @@ AM_CONDITIONAL([WITH_NETWORK_ISOLATOR],
[test "x$with_network_isolator" = "xyes"])
+AC_MSG_CHECKING([whether to enable the XFS disk isolator])
+AS_IF([test "x$enable_xfs_disk_isolator" = "xyes"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+
+AS_IF([test "x$enable_xfs_disk_isolator" = "xyes"], [
+ # We only support XFS on Linux.
+ AS_IF([test "$OS_NAME" = "linux"],
+ [],
+ [AC_MSG_ERROR([no XFS support on $OS_NAME
+-------------------------------------------------------------------
+The XFS disk isolator is only supported on Linux.
+-------------------------------------------------------------------
+ ])])
+
+ # Check for build dependencies for the XFS disk isolator. We only
+ # enable this if all the needed headers and libraries are present.
+ AC_CHECK_HEADERS([xfs/xfs.h xfs/xqm.h linux/quota.h sys/quota.h],
+ [], [AC_MSG_ERROR([missing XFS quota headers
+-------------------------------------------------------------------
+Please install the Linux kernel headers and xfsprogs development
+packages for XFS disk isolator support.
+-------------------------------------------------------------------
+ ])])
+
+ AC_CHECK_HEADERS([blkid/blkid.h], [], [AC_MSG_ERROR([missing libblkid headers
+-------------------------------------------------------------------
+Please install the libblkid development package for XFS disk
+isolator support.
+-------------------------------------------------------------------
+ ])])
+
+ # Note that AC_SEARCH_LIBS causes libblkid to be added to each binary. In
+ # this case, that is what we want, since the dependency will be in libmesos.
+ AC_SEARCH_LIBS(blkid_devno_to_devname, blkid, [], [AC_MSG_ERROR([missing libblkid
+-------------------------------------------------------------------
+Please install the libblkid package for XFS disk isolator support.
+-------------------------------------------------------------------
+ ])])
+
+ AC_DEFINE([ENABLE_XFS_DISK_ISOLATOR])
+])
+
+AM_CONDITIONAL([ENABLE_XFS_DISK_ISOLATOR], [test "x$enable_xfs_disk_isolator" = "xyes"])
+
+
# Check if Nvidia GPU support is enabled, and if so, verify we can
# access the NVML header files and libs.
if test x"$enable_nvidia_gpu_support" = "xyes"; then