You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ch...@apache.org on 2018/03/28 21:16:54 UTC
mesos git commit: Temporarily disabled CSI proto compilation when
gRPC is disabled.
Repository: mesos
Updated Branches:
refs/heads/master b3ad6d561 -> 97c601713
Temporarily disabled CSI proto compilation when gRPC is disabled.
The `major` and `minor` macros defined on some systems conflict with
field names in the CSI spec proto, so its compilation is temporarily
disabled for now until CSI is bumped to 0.2, where those field are
removed.
Review: https://reviews.apache.org/r/66255
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/97c60171
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/97c60171
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/97c60171
Branch: refs/heads/master
Commit: 97c6017135c3a8c086508724359b93700b03387d
Parents: b3ad6d5
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Fri Mar 23 12:45:15 2018 -0700
Committer: Chun-Hung Hsiao <ch...@mesosphere.io>
Committed: Wed Mar 28 14:16:28 2018 -0700
----------------------------------------------------------------------
src/CMakeLists.txt | 3 +--
src/Makefile.am | 24 +++++++++++++++++-------
src/slave/flags.cpp | 2 ++
src/slave/slave.cpp | 4 ++++
4 files changed, 24 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/97c60171/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3b04e63..fb9e9d4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -365,8 +365,7 @@ set(RESOURCE_PROVIDER_SRC
resource_provider/local.cpp
resource_provider/manager.cpp
resource_provider/registrar.cpp
- resource_provider/validation.cpp
- resource_provider/storage/disk_profile_adaptor.cpp)
+ resource_provider/validation.cpp)
set(SCHEDULER_SRC
sched/sched.cpp
http://git-wip-us.apache.org/repos/asf/mesos/blob/97c60171/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index a570c9f..9f4b6d3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -372,6 +372,7 @@ CXX_PROTOS += \
slave/containerizer/mesos/isolators/network/cni/spec.pb.cc \
slave/containerizer/mesos/isolators/network/cni/spec.pb.h
+if ENABLE_GRPC
CXX_PROTOS += \
resource_provider/storage/disk_profile.pb.cc \
resource_provider/storage/disk_profile.pb.h
@@ -382,7 +383,6 @@ CXX_CSI_PROTOS = \
csi/state.pb.cc \
csi/state.pb.h
-if ENABLE_GRPC
CXX_CSI_PROTOS += \
../include/csi/csi.grpc.pb.cc \
../include/csi/csi.grpc.pb.h
@@ -727,7 +727,6 @@ module_HEADERS = \
$(top_srcdir)/include/mesos/module/container_logger.hpp \
$(top_srcdir)/include/mesos/module/contender.hpp \
$(top_srcdir)/include/mesos/module/detector.hpp \
- $(top_srcdir)/include/mesos/module/disk_profile_adaptor.hpp \
$(top_srcdir)/include/mesos/module/hook.hpp \
$(top_srcdir)/include/mesos/module/hook.proto \
$(top_srcdir)/include/mesos/module/http_authenticatee.hpp \
@@ -740,6 +739,11 @@ module_HEADERS = \
$(top_srcdir)/include/mesos/module/secret_generator.hpp \
$(top_srcdir)/include/mesos/module/secret_resolver.hpp
+if ENABLE_GRPC
+module_HEADERS += \
+ $(top_srcdir)/include/mesos/module/disk_profile_adaptor.hpp
+endif
+
nodist_module_HEADERS = \
../include/mesos/module/hook.pb.h \
../include/mesos/module/module.pb.h
@@ -766,8 +770,12 @@ resourceproviderdir = $(pkgincludedir)/resource_provider
resourceprovider_HEADERS = \
$(top_srcdir)/include/mesos/resource_provider/resource_provider.hpp \
- $(top_srcdir)/include/mesos/resource_provider/resource_provider.proto \
+ $(top_srcdir)/include/mesos/resource_provider/resource_provider.proto
+
+if ENABLE_GRPC
+resourceprovider_HEADERS += \
$(top_srcdir)/include/mesos/resource_provider/storage/disk_profile_adaptor.hpp
+endif
nodist_resourceprovider_HEADERS = \
../include/mesos/resource_provider/resource_provider.pb.h
@@ -1461,13 +1469,13 @@ libmesos_no_3rdparty_la_SOURCES += \
authentication/executor/jwt_secret_generator.hpp
endif
+if ENABLE_GRPC
libmesos_no_3rdparty_la_SOURCES += \
resource_provider/storage/disk_profile_adaptor.cpp \
resource_provider/storage/disk_profile.proto \
resource_provider/storage/disk_profile_utils.cpp \
resource_provider/storage/disk_profile_utils.hpp
-if ENABLE_GRPC
libmesos_no_3rdparty_la_SOURCES += \
resource_provider/storage/provider.cpp \
resource_provider/storage/provider.hpp
@@ -1516,6 +1524,7 @@ libbuild_la_CPPFLAGS += -DBUILD_FLAGS="\"$$BUILD_FLAGS\""
libmesos_no_3rdparty_la_LIBADD += libbuild.la
+if ENABLE_GRPC
# Convenience library for build the CSI client.
noinst_LTLIBRARIES += libcsi.la
libcsi_la_SOURCES = \
@@ -1528,16 +1537,15 @@ libcsi_la_SOURCES += \
csi/state.proto \
csi/utils.hpp
-if ENABLE_GRPC
libcsi_la_SOURCES += \
csi/client.cpp \
csi/client.hpp
-endif
nodist_libcsi_la_SOURCES = $(CXX_CSI_PROTOS)
libcsi_la_CPPFLAGS = $(MESOS_CPPFLAGS)
libmesos_no_3rdparty_la_LIBADD += libcsi.la
+endif
# Convenience library for building the replicated log in order to
@@ -2336,6 +2344,7 @@ libload_qos_controller_la_SOURCES += slave/qos_controllers/load.cpp
libload_qos_controller_la_CPPFLAGS = $(MESOS_CPPFLAGS)
libload_qos_controller_la_LDFLAGS = $(MESOS_MODULE_LDFLAGS)
+if ENABLE_GRPC
# Library containing the URI disk profile adaptor module.
pkgmodule_LTLIBRARIES += liburi_disk_profile_adaptor.la
liburi_disk_profile_adaptor_la_SOURCES = \
@@ -2344,6 +2353,7 @@ liburi_disk_profile_adaptor_la_SOURCES = \
resource_provider/storage/disk_profile_utils.hpp
liburi_disk_profile_adaptor_la_CPPFLAGS = $(MESOS_CPPFLAGS)
liburi_disk_profile_adaptor_la_LDFLAGS = $(MESOS_MODULE_LDFLAGS)
+endif
MESOS_TEST_MODULE_LDFLAGS = $(MESOS_MODULE_LDFLAGS)
@@ -2466,7 +2476,6 @@ mesos_tests_SOURCES = \
tests/cram_md5_authentication_tests.cpp \
tests/credentials_tests.cpp \
tests/default_executor_tests.cpp \
- tests/disk_profile_adaptor_tests.cpp \
tests/disk_quota_tests.cpp \
tests/dynamic_weights_tests.cpp \
tests/environment.cpp \
@@ -2576,6 +2585,7 @@ mesos_tests_SOURCES = \
if ENABLE_GRPC
mesos_tests_SOURCES += \
tests/csi_client_tests.cpp \
+ tests/disk_profile_adaptor_tests.cpp \
tests/mock_csi_plugin.cpp \
tests/mock_csi_plugin.hpp
endif
http://git-wip-us.apache.org/repos/asf/mesos/blob/97c60171/src/slave/flags.cpp
----------------------------------------------------------------------
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index dd8dfb7..962b07c 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -111,6 +111,7 @@ mesos::internal::slave::Flags::Flags()
" \"name\": \"lvm\"\n"
"}");
+#ifdef ENABLE_GRPC
add(&Flags::disk_profile_adaptor,
"disk_profile_adaptor",
"The name of the disk profile adaptor module that storage resource\n"
@@ -119,6 +120,7 @@ mesos::internal::slave::Flags::Flags()
"If this flag is not specified, the default behavior for storage\n"
"resource providers is to only expose resources for pre-existing\n"
"volumes and not publish RAW volumes.");
+#endif
add(&Flags::isolation,
"isolation",
http://git-wip-us.apache.org/repos/asf/mesos/blob/97c60171/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index e76daab..a4bd4cc 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -36,7 +36,9 @@
#include <mesos/module/authenticatee.hpp>
+#ifdef ENABLE_GRPC
#include <mesos/resource_provider/storage/disk_profile_adaptor.hpp>
+#endif
#include <process/after.hpp>
#include <process/async.hpp>
@@ -422,6 +424,7 @@ void Slave::initialize()
<< mkdir.error();
}
+#ifdef ENABLE_GRPC
// Create the DiskProfileAdaptor module and set it globally so
// any component that needs the module can share this instance.
Try<DiskProfileAdaptor*> _diskProfileAdaptor =
@@ -437,6 +440,7 @@ void Slave::initialize()
shared_ptr<DiskProfileAdaptor>(_diskProfileAdaptor.get());
DiskProfileAdaptor::setAdaptor(diskProfileAdaptor);
+#endif
string scheme = "http";