]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: make the ASIO front-end compilation optional.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Sat, 15 Oct 2016 01:13:22 +0000 (03:13 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 21 Oct 2016 20:57:23 +0000 (22:57 +0200)
This is because of versioning issues between Boost and Beast
on CentOS 7. It is intended that this patch will be reverted
after merging the in-tree Boost facility.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
CMakeLists.txt
src/include/config-h.in.cmake
src/rgw/CMakeLists.txt
src/rgw/rgw_main.cc

index 352fe463ad4e05df2a56f4dbe49b019e766878d9..da7d3cbd8a2a9f65c89cbeeb77e13be1c0250b4e 100644 (file)
@@ -323,6 +323,8 @@ if(WITH_RADOSGW)
   find_package(fcgi REQUIRED)
 endif(WITH_RADOSGW)
 
+option(WITH_RADOSGW_ASIO_FRONTEND "Rados Gateway's ASIO frontend is enabled" OFF)
+
 #option for CephFS
 option(WITH_CEPHFS "CephFS is enabled" ON)
 
index 1123f5812d6fbbfd825cc57eb0294cf909dbadae..337b7d80a58aa07240215ce94367e827a4c01dd1 100644 (file)
 /* define if radosgw enabled */
 #cmakedefine WITH_RADOSGW
 
+/* define if radosgw's asio frontend enabled */
+#cmakedefine WITH_RADOSGW_ASIO_FRONTEND
+
 /* define if HAVE_THREAD_SAFE_RES_QUERY */
 #cmakedefine HAVE_THREAD_SAFE_RES_QUERY
 
index 4b1b323db891ce4e8bcbef75c9e7433a42d90a8d..20984a0adc9b465b115d87798bbb00ad3f164398 100644 (file)
@@ -107,14 +107,19 @@ target_link_libraries(rgw_a librados cls_lock_client cls_rgw_client cls_refcount
   ${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS})
 
 set(radosgw_srcs
-  rgw_asio_client.cc
-  rgw_asio_frontend.cc
   rgw_fcgi_process.cc
   rgw_loadgen_process.cc
   rgw_civetweb.cc
   rgw_civetweb_frontend.cc
   rgw_civetweb_log.cc
   rgw_main.cc)
+
+if (WITH_RADOSGW_ASIO_FRONTEND)
+  list(APPEND radosgw_srcs
+    rgw_asio_client.cc
+    rgw_asio_frontend.cc)
+endif (WITH_RADOSGW_ASIO_FRONTEND)
+
 add_executable(radosgw ${radosgw_srcs}  $<TARGET_OBJECTS:civetweb_common_objs>)
 target_link_libraries(radosgw rgw_a librados
   cls_rgw_client cls_lock_client cls_refcount_client
index afaea85f4bccecc9924854eaf3e688b3e629f96c..c4a898e0a4a7bf9042cc62eae8f57eeae0e784b0 100644 (file)
@@ -53,7 +53,9 @@
 #include "rgw_request.h"
 #include "rgw_process.h"
 #include "rgw_frontend.h"
+#if defined(WITH_RADOSGW_ASIO_FRONTEND)
 #include "rgw_asio_frontend.h"
+#endif /* WITH_RADOSGW_ASIO_FRONTEND */
 
 #include <map>
 #include <string>
@@ -431,6 +433,7 @@ int main(int argc, const char **argv)
     RGWFrontendConfig *config = fiter->second;
     string framework = config->get_framework();
     RGWFrontend *fe;
+#if defined(WITH_RADOSGW_ASIO_FRONTEND)
     if ((framework == "asio") &&
        cct->check_experimental_feature_enabled("rgw-asio-frontend")) {
       int port;
@@ -440,6 +443,9 @@ int main(int argc, const char **argv)
       RGWProcessEnv env{ store, &rest, olog, port, uri_prefix };
       fe = new RGWAsioFrontend(env);
     } else if (framework == "fastcgi" || framework == "fcgi") {
+#else
+    if (framework == "fastcgi" || framework == "fcgi") {
+#endif /* WITH_RADOSGW_ASIO_FRONTEND */
       std::string uri_prefix;
       config->get_val("prefix", "", &uri_prefix);
       RGWProcessEnv fcgi_pe = { store, &rest, olog, 0, uri_prefix };