Repository: mesos
Updated Branches:
  refs/heads/master b95312d44 -> 654e5984f


Enabled CSI proto compilation by default.

CSI proto compilation is disabled due to MESOS-8749, which is resolved
by bumping CSI to v0.2. This patch enables the compilation again.

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


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

Branch: refs/heads/master
Commit: 2adbfdcbda9384ce5d29528a4a94b4b21dfca901
Parents: b95312d
Author: Chun-Hung Hsiao <[email protected]>
Authored: Fri Apr 20 18:17:43 2018 -0700
Committer: Chun-Hung Hsiao <[email protected]>
Committed: Fri Apr 20 18:17:43 2018 -0700

----------------------------------------------------------------------
 src/CMakeLists.txt  |  7 ++++++-
 src/Makefile.am     | 37 +++++++++++++------------------------
 src/slave/flags.cpp |  2 --
 src/slave/slave.cpp |  4 ----
 4 files changed, 19 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2adbfdcb/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 31af9ea..4908cb9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -29,6 +29,10 @@ set(JAVA_PROTOBUF_SRC "")
 # Build the protobuf structs.
 #
 # NOTE: The following `PROTOC_GENERATE` calls will list append to
+# `PUBLIC_PROTO_PATH`, `PUBLIC_PROTOBUF_INCLUDE_DIR` and `PUBLIC_PROTOBUF_SRC`.
+PROTOC_GENERATE(GRPC LIB csi TARGET csi)
+
+# NOTE: The following `PROTOC_GENERATE` calls will list append to
 # `PUBLIC_PROTOBUF_SRC`.
 PROTOC_GENERATE(TARGET mesos/agent/agent)
 PROTOC_GENERATE(TARGET mesos/allocator/allocator)
@@ -364,7 +368,8 @@ set(RESOURCE_PROVIDER_SRC
   resource_provider/local.cpp
   resource_provider/manager.cpp
   resource_provider/registrar.cpp
-  resource_provider/validation.cpp)
+  resource_provider/validation.cpp
+  resource_provider/storage/disk_profile_adaptor.cpp)
 
 set(SCHEDULER_SRC
   sched/sched.cpp

http://git-wip-us.apache.org/repos/asf/mesos/blob/2adbfdcb/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 9d610bb..e50e43b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -384,7 +384,6 @@ 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
@@ -395,6 +394,7 @@ 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
@@ -739,6 +739,7 @@ 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            \
@@ -751,11 +752,6 @@ 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
@@ -782,12 +778,8 @@ resourceproviderdir = $(pkgincludedir)/resource_provider
 
 resourceprovider_HEADERS =                                                     
\
   $(top_srcdir)/include/mesos/resource_provider/resource_provider.hpp          
\
-  $(top_srcdir)/include/mesos/resource_provider/resource_provider.proto
-
-if ENABLE_GRPC
-resourceprovider_HEADERS +=                                                    
\
+  $(top_srcdir)/include/mesos/resource_provider/resource_provider.proto        
        \
   
$(top_srcdir)/include/mesos/resource_provider/storage/disk_profile_adaptor.hpp
-endif
 
 nodist_resourceprovider_HEADERS =                                      \
   ../include/mesos/resource_provider/resource_provider.pb.h
@@ -1481,13 +1473,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
@@ -1539,20 +1531,19 @@ libmesos_no_3rdparty_la_LIBADD += libbuild.la
 # Convenience library for build the CSI client.
 noinst_LTLIBRARIES += libcsi.la
 libcsi_la_SOURCES =                                                    \
-  csi/paths.cpp
-
-libcsi_la_SOURCES +=                                                   \
-  csi/paths.hpp
-
-if ENABLE_GRPC
+  csi/paths.cpp                                                                
\
+  csi/utils.cpp
 libcsi_la_SOURCES +=                                                   \
   ../include/csi/spec.hpp                                              \
-  csi/client.cpp                                                       \
-  csi/client.hpp                                                       \
+  csi/paths.hpp                                                                
\
   csi/state.hpp                                                                
\
   csi/state.proto                                                      \
-  csi/utils.cpp                                                                
\
   csi/utils.hpp
+
+if ENABLE_GRPC
+libcsi_la_SOURCES +=                                                   \
+  csi/client.cpp                                                       \
+  csi/client.hpp
 endif
 
 nodist_libcsi_la_SOURCES = $(CXX_CSI_PROTOS)
@@ -2390,7 +2381,6 @@ 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 =                       \
@@ -2399,7 +2389,6 @@ 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)
 
@@ -2522,6 +2511,7 @@ 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                                                \
@@ -2631,7 +2621,6 @@ 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/2adbfdcb/src/slave/flags.cpp
----------------------------------------------------------------------
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index e330e5f..0ee4f65 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -111,7 +111,6 @@ 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"
@@ -120,7 +119,6 @@ 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/2adbfdcb/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 9d2d192..2b8c6e0 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -36,9 +36,7 @@
 
 #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>
@@ -424,7 +422,6 @@ 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 =
@@ -440,7 +437,6 @@ void Slave::initialize()
     shared_ptr<DiskProfileAdaptor>(_diskProfileAdaptor.get());
 
   DiskProfileAdaptor::setAdaptor(diskProfileAdaptor);
-#endif
 
   string scheme = "http";
 

Reply via email to