]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Remove embedded 'cephd' code 21940/head
authorDan Mick <dan.mick@redhat.com>
Wed, 9 May 2018 02:24:17 +0000 (19:24 -0700)
committerDan Mick <dan.mick@redhat.com>
Fri, 11 May 2018 20:10:26 +0000 (13:10 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
48 files changed:
CMakeLists.txt
README.alpine.md
alpine/APKBUILD.in
ceph.spec.in
cmake/modules/MergeStaticLibraries.cmake [deleted file]
debian/rules
do_freebsd.sh
doc/dev/macos.rst
src/CMakeLists.txt
src/ceph_mds.cc
src/ceph_mon.cc
src/ceph_osd.cc
src/cls/CMakeLists.txt
src/compressor/CMakeLists.txt
src/compressor/brotli/CMakeLists.txt
src/compressor/brotli/CompressionPluginBrotli.cc
src/compressor/lz4/CMakeLists.txt
src/compressor/lz4/CompressionPluginLZ4.cc
src/compressor/snappy/CMakeLists.txt
src/compressor/snappy/CompressionPluginSnappy.cc
src/compressor/zlib/CMakeLists.txt
src/compressor/zlib/CompressionPluginZlib.cc
src/compressor/zstd/CMakeLists.txt
src/compressor/zstd/CompressionPluginZstd.cc
src/erasure-code/CMakeLists.txt
src/erasure-code/isa/CMakeLists.txt
src/erasure-code/isa/ErasureCodePluginIsa.cc
src/erasure-code/jerasure/CMakeLists.txt
src/erasure-code/jerasure/ErasureCodePluginJerasure.cc
src/erasure-code/lrc/CMakeLists.txt
src/erasure-code/lrc/ErasureCodePluginLrc.cc
src/erasure-code/shec/CMakeLists.txt
src/erasure-code/shec/ErasureCodePluginShec.cc
src/include/cephd/libcephd.h [deleted file]
src/include/config-h.in.cmake
src/include/rados/objclass.h
src/key_value_store/CMakeLists.txt
src/libcephd/CMakeLists.txt [deleted file]
src/libcephd/libcephd.cc [deleted file]
src/librados/CMakeLists.txt
src/librbd/CMakeLists.txt
src/rgw/CMakeLists.txt
src/rgw/rgw_admin.cc
src/rgw/rgw_main.cc
src/test/CMakeLists.txt
src/test/libcephd/CMakeLists.txt [deleted file]
src/test/libcephd/misc.cc [deleted file]
src/test/libcephd/test.cc [deleted file]

index 18c23e1c8301cab3aabb68c6c2a7ecf506e07fba..4ff3009d73d015caa391fb9a3200b8ead2ef3a8e 100644 (file)
@@ -276,13 +276,6 @@ if(WITH_KRBD AND WITHOUT_RBD)
   message(FATAL_ERROR "Cannot have WITH_KRBD with WITH_RBD.")
 endif()
 
-# embedded ceph daemon static library
-# NOTE: Ceph is mostly LGPL (see COPYING), which means that
-# static linking brings with it restrictions. Please be sure
-# to look at the LGPL license carefully before linking this library to
-# your code. See http://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic.
-option(WITH_EMBEDDED "build the embedded ceph daemon library" ON)
-
 option(WITH_LEVELDB "LevelDB is here" ON)
 if(WITH_LEVELDB)
   if(LEVELDB_PREFIX)
index fb0424a88e76d3681ace3f08ff410f275d532ec7..0fe91088c109db585488f2aefa6abb4f231e0227 100644 (file)
@@ -10,7 +10,7 @@ git clone https://github.com/ceph/ceph
 ### Build
 
 ```
-./run-make-check.sh -DWITH_EMBEDDED=OFF -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON
+./run-make-check.sh -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON
 ```
 
 ### Packaging
@@ -28,7 +28,7 @@ cd ceph/src
 
 or
 
-./test/docker-test.sh --os-type alpine --os-version edge -- ./run-make-check.sh -DWITH_EMBEDDED=OFF -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON
+./test/docker-test.sh --os-type alpine --os-version edge -- ./run-make-check.sh -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON
 
 ```
 
index ae166d70f62188eaa4c217fa965ba42808289155..dccc75d4f6eb4fb6d2980fc09d903925d4eb3418 100644 (file)
@@ -142,7 +142,6 @@ build() {
                -DWITH_PYTHON3=OFF \
                -DWITH_LTTNG=OFF \
                -DWITH_SYSTEM_BOOST=ON \
-               -DWITH_EMBEDDED=OFF \
                -DWITH_TESTS=${_with_tests:-OFF} \
                || return 1
        make -j${JOBS:-2} || return 1
index 81353ed6beb89a59608f12071529a49f4505864c..8dad4b36d933ede7368e2175a2ff5bb69dc8b15a 100644 (file)
@@ -900,7 +900,6 @@ cmake .. \
     -DCMAKE_INSTALL_MANDIR=%{_mandir} \
     -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
     -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-    -DWITH_EMBEDDED=OFF \
     -DWITH_MANPAGE=ON \
     -DWITH_PYTHON3=ON \
     -DWITH_MGR_DASHBOARD_FRONTEND=OFF \
diff --git a/cmake/modules/MergeStaticLibraries.cmake b/cmake/modules/MergeStaticLibraries.cmake
deleted file mode 100644 (file)
index 92d4156..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# This function is a helper that will merge static libraries.
-# For example,
-#
-#    merge_static_libraries(mylib staticlibX staticlibY)
-#
-# mylib.a will generate a new static library mylib that is
-# a combination of staticlibX and staticlibY
-#
-function(merge_static_libraries target)
-
-    set(dummy_source ${CMAKE_CURRENT_BINARY_DIR}/${target}_dummy.c)
-    add_library(${target} STATIC ${dummy_source})
-
-    # remove duplicates
-    set(libs ${ARGN})
-    list(REMOVE_DUPLICATES libs)
-
-    # validate that all libs are static
-    foreach(lib ${libs})
-        if (NOT TARGET ${lib})
-            message(FATAL_ERROR "${lib} not a valid target")
-        endif()
-
-        get_target_property(libtype ${lib} TYPE)
-        if(NOT libtype STREQUAL "STATIC_LIBRARY")
-            message(FATAL_ERROR "${lib} not a static library")
-        endif()
-
-        # add a dependency on the lib
-        add_dependencies(${target} ${lib})
-    endforeach()
-
-    # Force the merged Make the generated dummy source file depended on all static input
-    # libs. If input lib changes,the source file is touched
-    # which causes the desired effect (relink).
-    add_custom_command(
-        OUTPUT  ${dummy_source}
-        COMMAND ${CMAKE_COMMAND} -E touch ${dummy_source}
-        DEPENDS ${libs})
-
-    # only LINUX is currently supported. OSX's libtool and windows lib.exe
-    # have native support for merging static libraries, and support for them
-    # can be easily added if required.
-    if(LINUX)
-        # generate a script to merge the static libraries in to the target
-        # library. see https://sourceware.org/binutils/docs/binutils/ar-scripts.html
-        set(mri_script "open $<TARGET_FILE:${target}>=")
-        foreach(lib ${libs})
-            # we use the generator expression TARGET_FILE to get the location
-            # of the library. this will not be expanded until the script file
-            # is written below
-            set(mri_script "${mri_script} addlib $<TARGET_FILE:${lib}>=")
-        endforeach()
-        set(mri_script "${mri_script} save=end")
-
-        add_custom_command(
-            TARGET ${target} POST_BUILD
-            COMMAND echo ${mri_script} | tr = \\\\n | ${CMAKE_AR} -M)
-    endif(LINUX)
-
-    message("-- MergeStaticLibraries: ${target}: merged ${libs}")
-
-    # we want to set the target_link_libraries correctly for the new merged
-    # static library. First we get the list of link libraries for each
-    # of the libs we are merging
-    set(link_libs)
-    foreach(lib ${libs})
-      get_property(trans TARGET ${lib} PROPERTY LINK_LIBRARIES)
-      list(APPEND link_libs ${trans})
-    endforeach()
-
-    if (link_libs)
-        # now remove the duplicates and any of the libraries we already merged
-        list(REMOVE_DUPLICATES link_libs)
-        foreach(lib ${libs})
-            list(REMOVE_ITEM link_libs ${lib})
-        endforeach()
-
-        # set the target link libraries
-        target_link_libraries(${target} ${link_libs})
-
-        message("-- MergeStaticLibraries: ${target}: remaining ${link_libs}")
-    endif()
-
-endfunction()
index f1e150035fa213a53c5e961bc68794395ba63771..85b32757861073f8e3e576aeac83eaf6e09137cd 100755 (executable)
@@ -5,7 +5,7 @@ export DESTDIR=$(CURDIR)/debian/tmp
 
 export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
-extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF -DWITH_MGR_DASHBOARD_FRONTEND=OFF
+extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_MGR_DASHBOARD_FRONTEND=OFF
 extraopts += -DWITH_CEPHFS_JAVA=ON
 extraopts += -DWITH_SYSTEMD=ON -DCEPH_SYSTEMD_ENV_DIR=/etc/default
 # assumes that ceph is exmpt from multiarch support, so we override the libdir.
index 762b1a9d6fea65720940f84204699a2fc0ecae1c..4a26e255f43391790efe4d03de4cf2bfafc35a37 100755 (executable)
@@ -31,7 +31,6 @@ rm -rf build && ./do_cmake.sh "$*" \
        -D CEPH_MAN_DIR=man \
        -D WITH_LIBCEPHFS=OFF \
        -D WITH_CEPHFS=OFF \
-       -D WITH_EMBEDDED=OFF \
        -D WITH_MGR=YES \
        -D WITH_SPDK=OFF \
        2>&1 | tee cmake.log
index 9c7402d0f755cbf819fbb62ff69ec766f6c86ede..6872744e4fc8796b8093f7e87fc73d77c50a597e 100644 (file)
@@ -25,7 +25,6 @@ then, under the source directory of Ceph::
     CXX=/usr/local/opt/llvm/bin/clang++ \
     cmake .. -DBOOST_J=4 \
     -DENABLE_GIT_VERSION=OFF \
-    -DWITH_EMBEDDED=OFF \
     -DWITH_MANPAGE=OFF \
     -DWITH_LIBCEPHFS=OFF \
     -DWITH_XFS=OFF \
index c006eeb38cab7bfd5821442b932c0187443e8d60..44b5bbd259c1c3b0eba53f3423cc9e9b1239dfe3 100644 (file)
@@ -1152,7 +1152,3 @@ if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
 endif()
 
 add_subdirectory(script)
-
-if(WITH_EMBEDDED)
-  add_subdirectory(libcephd)
-endif()
index 474c4789916bb1405f8f286cb23020799628cf19..3dea53b7bc13c159d55abd9024989e7d04714eed 100644 (file)
@@ -89,11 +89,7 @@ static void handle_mds_signal(int signum)
     mds->handle_signal(signum);
 }
 
-#ifdef BUILDING_FOR_EMBEDDED
-extern "C" int cephd_mds(int argc, const char **argv)
-#else
 int main(int argc, const char **argv)
-#endif
 {
   ceph_pthread_setname(pthread_self(), "ceph-mds");
 
index 192795183a52ba18155ef6fd45f73a691dc054f3..297111831d0b3a872e50f384b47321311be37473 100644 (file)
@@ -180,12 +180,7 @@ static void usage()
   generic_server_usage();
 }
 
-#ifdef BUILDING_FOR_EMBEDDED
-void cephd_preload_embedded_plugins();
-extern "C" int cephd_mon(int argc, const char **argv)
-#else
 int main(int argc, const char **argv)
-#endif
 {
   int err;
 
@@ -513,12 +508,8 @@ int main(int argc, const char **argv)
     }
     common_init_finish(g_ceph_context);
     global_init_chdir(g_ceph_context);
-#ifndef BUILDING_FOR_EMBEDDED
     if (global_init_preload_erasure_code(g_ceph_context) < 0)
       prefork.exit(1);
-#else
-    cephd_preload_embedded_plugins();
-#endif
   }
 
   // set up signal handlers, now that we've daemonized/forked.
index 6914f9b54dd9946d6919da3b98c342e4c9bf973b..d3fe2e15fee9936691eb5dbdb29f9e7ecbf984ff 100644 (file)
@@ -100,13 +100,7 @@ static void usage()
   generic_server_usage();
 }
 
-#ifdef BUILDING_FOR_EMBEDDED
-void cephd_preload_embedded_plugins();
-void cephd_preload_rados_classes(OSD *osd);
-extern "C" int cephd_osd(int argc, const char **argv)
-#else
 int main(int argc, const char **argv)
-#endif
 {
   vector<const char*> args;
   argv_to_vec(argc, argv, args);
@@ -297,9 +291,6 @@ int main(int argc, const char **argv)
     forker.exit(-ENODEV);
   }
 
-#ifdef BUILDING_FOR_EMBEDDED
-  cephd_preload_embedded_plugins();
-#endif
 
   if (mkkey) {
     common_init_finish(g_ceph_context);
@@ -635,11 +626,9 @@ flushjournal_out:
     return -1;
   global_init_chdir(g_ceph_context);
 
-#ifndef BUILDING_FOR_EMBEDDED
   if (global_init_preload_erasure_code(g_ceph_context) < 0) {
     forker.exit(1);
   }
-#endif
 
   osd = new OSD(g_ceph_context,
                 store,
@@ -686,10 +675,6 @@ flushjournal_out:
   }
 
 
-#ifdef BUILDING_FOR_EMBEDDED
-  cephd_preload_rados_classes(osd);
-#endif
-
   register_async_signal_handler_oneshot(SIGINT, handle_osd_signal);
   register_async_signal_handler_oneshot(SIGTERM, handle_osd_signal);
 
index fbc32d5b64dd788e0db5d881b928d9f421aff686..f23856cb855a85af39e32b9615abdf509f1e5936 100644 (file)
@@ -1,7 +1,6 @@
 ## Rados object classes
 
 set(cls_dir ${CMAKE_INSTALL_LIBDIR}/rados-classes)
-set(cls_embedded_srcs)
 
 # cls_sdk
 add_library(cls_sdk SHARED sdk/cls_sdk.cc)
@@ -21,7 +20,6 @@ set_target_properties(cls_hello PROPERTIES
   INSTALL_RPATH ""
   CXX_VISIBILITY_PRESET hidden)
 install(TARGETS cls_hello DESTINATION ${cls_dir})
-list(APPEND cls_embedded_srcs ${cls_hello_srcs})
 
 # cls_numops
 set(cls_numops_srcs numops/cls_numops.cc)
@@ -36,7 +34,6 @@ install(TARGETS cls_numops DESTINATION ${cls_dir})
 set(cls_numops_client_srcs numops/cls_numops_client.cc)
 add_library(cls_numops_client STATIC ${cls_numops_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_numops_srcs} ${cls_numops_client_srcs})
 
 # cls_rbd
 if (WITH_RBD)
@@ -53,7 +50,6 @@ if (WITH_RBD)
   add_library(cls_rbd_client STATIC ${cls_rbd_client_srcs})
   target_link_libraries(cls_rbd_client cls_lock_client)
 
-  list(APPEND cls_embedded_srcs ${cls_rbd_srcs} ${cls_rbd_client_srcs})
 endif (WITH_RBD)
 
 # cls_lock
@@ -72,7 +68,6 @@ set(cls_lock_client_srcs
   lock/cls_lock_ops.cc)
 add_library(cls_lock_client STATIC ${cls_lock_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_lock_srcs} ${cls_lock_client_srcs})
 
 # cls_otp
 set(cls_otp_srcs otp/cls_otp.cc)
@@ -90,7 +85,6 @@ set(cls_otp_client_srcs
   otp/cls_otp_types.cc
   )
 add_library(cls_otp_client STATIC ${cls_otp_client_srcs})
-list(APPEND cls_embedded_srcs ${cls_otp_srcs} ${cls_otp_client_srcs})
 
 # cls_refcount
 set(cls_refcount_srcs
@@ -111,7 +105,6 @@ set(cls_refcount_client_srcs
   refcount/cls_refcount_ops.cc)
 add_library(cls_refcount_client STATIC ${cls_refcount_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_refcount_srcs} ${cls_refcount_client_srcs})
 
 # cls_version
 set(cls_version_srcs version/cls_version.cc)
@@ -128,7 +121,6 @@ set(cls_version_client_srcs
   version/cls_version_types.cc)
 add_library(cls_version_client STATIC ${cls_version_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_version_srcs} ${cls_version_client_srcs})
 
 # cls_log
 set(cls_log_srcs log/cls_log.cc)
@@ -143,7 +135,6 @@ install(TARGETS cls_log DESTINATION ${cls_dir})
 set(cls_log_client_srcs log/cls_log_client.cc)
 add_library(cls_log_client STATIC ${cls_log_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_log_srcs} ${cls_log_client_srcs})
 
 # cls_statelog
 set(cls_statelog_srcs statelog/cls_statelog.cc)
@@ -158,7 +149,6 @@ install(TARGETS cls_statelog DESTINATION ${cls_dir})
 set(cls_statelog_client_srcs statelog/cls_statelog_client.cc)
 add_library(cls_statelog_client STATIC ${cls_statelog_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_statelog_srcs} ${cls_statelog_client_srcs})
 
 # cls_timeindex
 set(cls_timeindex_srcs timeindex/cls_timeindex.cc)
@@ -173,7 +163,6 @@ install(TARGETS cls_timeindex DESTINATION ${cls_dir})
 set(cls_timeindex_client_srcs timeindex/cls_timeindex_client.cc)
 add_library(cls_timeindex_client STATIC ${cls_timeindex_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_timeindex_srcs} ${cls_timeindex_client_srcs})
 
 # cls_user
 set(cls_user_srcs user/cls_user.cc)
@@ -191,7 +180,6 @@ set(cls_user_client_srcs
   user/cls_user_ops.cc)
 add_library(cls_user_client STATIC ${cls_user_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_user_srcs} ${cls_user_client_srcs})
 
 # cls_journal
 set(cls_journal_srcs
@@ -210,7 +198,6 @@ set(cls_journal_client_srcs
   journal/cls_journal_types.cc)
 add_library(cls_journal_client STATIC ${cls_journal_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_journal_srcs} ${cls_journal_client_srcs})
 
 # cls_rgw
 if (WITH_RADOSGW)
@@ -234,7 +221,6 @@ if (WITH_RADOSGW)
     rgw/cls_rgw_ops.cc)
   add_library(cls_rgw_client STATIC ${cls_rgw_client_srcs})
 
-  list(APPEND cls_embedded_srcs ${cls_rgw_srcs} ${cls_rgw_client_srcs})
 endif (WITH_RADOSGW)
 
 # cls_cephfs
@@ -253,7 +239,6 @@ if (WITH_CEPHFS)
     cephfs/cls_cephfs_client.cc)
   add_library(cls_cephfs_client STATIC ${cls_cephfs_client_srcs})
 
-  list(APPEND cls_embedded_srcs ${cls_cephfs_srcs} ${cls_cephfs_client_srcs})
 endif (WITH_CEPHFS)
 
 # cls_lua
@@ -275,15 +260,3 @@ set(cls_lua_client_srcs
     lua/cls_lua_client.cc)
 add_library(cls_lua_client STATIC ${cls_lua_client_srcs})
 
-list(APPEND cls_embedded_srcs ${cls_lua_srcs} ${cls_lua_client_srcs})
-
-if(WITH_EMBEDDED)
-  include(MergeStaticLibraries)
-  list(REMOVE_DUPLICATES cls_embedded_srcs)
-  add_library(cephd_cls_base STATIC ${cls_embedded_srcs})
-  # while not necessary this seems to bring in the lua's include directories
-  # so that cls_lua srcs build correctly
-  target_link_libraries(cephd_cls_base liblua)
-  set_target_properties(cephd_cls_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-  merge_static_libraries(cephd_cls cephd_cls_base liblua)
-endif()
index 6a401679092076f84f5befe4832d24ed50db1349..5182784288e92c56621b94269f8391f2affd5633 100644 (file)
@@ -37,24 +37,3 @@ endif()
 
 add_custom_target(compressor_plugins DEPENDS
     ${ceph_compressor_libs})
-
-if(WITH_EMBEDDED)
-  include(MergeStaticLibraries)
-  add_library(cephd_compressor_base STATIC ${compressor_srcs})
-  if(HAVE_QATZIP)
-    target_link_libraries(cephd_compressor_base ${QATZIP_LIBRARIES})
-  endif()
-  set_target_properties(cephd_compressor_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-  set(cephd_compressor_libs
-      cephd_compressor_base
-      cephd_compressor_snappy
-      cephd_compressor_zlib
-      cephd_compressor_zstd)
-  if(HAVE_LZ4)
-    list(APPEND cephd_compressor_libs cephd_compressor_lz4)
-  endif()
-  if(HAVE_BROTLI)
-    list(APPEND cephd_compressor_libs cephd_compressor_brotli)
-  endif()
-  merge_static_libraries(cephd_compressor ${cephd_compressor_libs})
-endif()
index 70be478044e8a935ab497c17f2a0dcf1eb9611b6..bbf90b1603ea14ec1322bc60859f83b0e4738b37 100644 (file)
@@ -35,9 +35,3 @@ target_include_directories(ceph_brotli        PRIVATE "${CMAKE_BINARY_DIR}/src/brotli/c
 List(REVERSE bortli_libs)
 target_link_libraries(ceph_brotli ${BROTLI_LIBRARIES})
 install(TARGETS ceph_brotli DESTINATION ${compressor_plugin_dir})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_compressor_brotli STATIC ${brotli_sources})
-  target_include_directories(cephd_compressor_brotli PRIVATE "${CMAKE_BINARY_DIR}/src/brotli/c/include")
-  set_target_properties(cephd_compressor_brotli PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index 9b11209f3e7c82e1795255232a635b4b1eb27617..0d85a44244688f54bb132e86de5893b25340e484 100644 (file)
@@ -2,8 +2,6 @@
 #include "ceph_ver.h"
 #include "CompressionPluginBrotli.h"
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 const char *__ceph_plugin_version()
 {
   return CEPH_GIT_NICE_VER;
@@ -17,4 +15,3 @@ int __ceph_plugin_init(CephContext *cct,
   return instance->add(type, name, new CompressionPluginBrotli(cct));
 }
 
-#endif // !BUILDING_FOR_EMBEDDED
index 921b4c573e23e6e3a406724d024f06dbc6acbee3..11d8576fac2309b37bb67cf96cf6c08a81e321d0 100644 (file)
@@ -11,8 +11,3 @@ set_target_properties(ceph_lz4 PROPERTIES
   SOVERSION 2
   INSTALL_RPATH "")
 install(TARGETS ceph_lz4 DESTINATION ${compressor_plugin_dir})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_compressor_lz4 STATIC ${lz4_sources})
-  set_target_properties(cephd_compressor_lz4 PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index c99e5dcdc8d5ab5c9314da5e148f4fc8ce8a7355..99d018765ba5e001518b78e2b81948ff1cfb33ff 100644 (file)
@@ -16,8 +16,6 @@
 #include "ceph_ver.h"
 #include "CompressionPluginLZ4.h"
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 // -----------------------------------------------------------------------------
 
 const char *__ceph_plugin_version()
@@ -35,5 +33,3 @@ int __ceph_plugin_init(CephContext *cct,
 
   return instance->add(type, name, new CompressionPluginLZ4(cct));
 }
-
-#endif // !BUILDING_FOR_EMBEDDED
index 139f62af5ddcb3d9852d913919d5d7fdc3f777de..7b38794c496aec00fb323181916ae5c9be6f8918 100644 (file)
@@ -13,8 +13,3 @@ set_target_properties(ceph_snappy PROPERTIES
   SOVERSION 2
   INSTALL_RPATH "")
 install(TARGETS ceph_snappy DESTINATION ${compressor_plugin_dir})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_compressor_snappy STATIC ${snappy_sources})
-  set_target_properties(cephd_compressor_snappy PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index 6d67c41c746d51cb6089ff9e5b9034d341008b01..44d77ccbb6f3c68fcbc1cd5439f1ade046bd083a 100644 (file)
@@ -18,8 +18,6 @@
 #include "ceph_ver.h"
 #include "CompressionPluginSnappy.h"
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 // -----------------------------------------------------------------------------
 
 const char *__ceph_plugin_version()
@@ -37,5 +35,3 @@ int __ceph_plugin_init(CephContext *cct,
 
   return instance->add(type, name, new CompressionPluginSnappy(cct));
 }
-
-#endif // !BUILDING_FOR_EMBEDDED
index 231129b872e0a6046492a2790957b804dc4b0de1..109fef521fc1ec031899e0377528506e84b6b27c 100644 (file)
@@ -45,9 +45,3 @@ set_target_properties(ceph_zlib PROPERTIES
   SOVERSION 2
   INSTALL_RPATH "")
 install(TARGETS ceph_zlib DESTINATION ${compressor_plugin_dir})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_compressor_zlib STATIC ${zlib_sources})
-       target_include_directories(cephd_compressor_zlib SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/isa-l/include")
-  set_target_properties(cephd_compressor_zlib PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index 26969f8377a291bca6d47ee194a3426beb58328e..3602ea4a8f75e880188dea8005c9adb2b72a9655 100644 (file)
@@ -18,7 +18,6 @@
 #include "ceph_ver.h"
 #include "CompressionPluginZlib.h"
 
-#ifndef BUILDING_FOR_EMBEDDED
 // -----------------------------------------------------------------------------
 
 const char *__ceph_plugin_version()
@@ -36,5 +35,3 @@ int __ceph_plugin_init(CephContext *cct,
 
   return instance->add(type, name, new CompressionPluginZlib(cct));
 }
-
-#endif // !BUILDING_FOR_EMBEDDED
index 5a80aa539c8ef7890923a655709bfd2f663c2c96..e30cb895aee29e145122daf98f4d3a95ded3070a 100644 (file)
@@ -39,8 +39,3 @@ set_target_properties(ceph_zstd PROPERTIES
   SOVERSION 2
   INSTALL_RPATH "")
 install(TARGETS ceph_zstd DESTINATION ${compressor_plugin_dir})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_compressor_zstd STATIC ${zstd_sources})
-  set_target_properties(cephd_compressor_zstd PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index 321b3dd96f62be6d9c2e5d5832f00208d74bf664..d9007b788a4d669d14e97f3ddf1af1971bdb1953 100644 (file)
@@ -16,8 +16,6 @@
 #include "ceph_ver.h"
 #include "CompressionPluginZstd.h"
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 // -----------------------------------------------------------------------------
 
 const char *__ceph_plugin_version()
@@ -35,5 +33,3 @@ int __ceph_plugin_init(CephContext *cct,
 
   return instance->add(type, name, new CompressionPluginZstd(cct));
 }
-
-#endif // !BUILDING_FOR_EMBEDDED
index 0ee74bb47f7b3637bcbf332c3245d347ebad9715..9bc62129458821e9a2f60ebbb87442571963701a 100644 (file)
@@ -24,7 +24,6 @@ add_subdirectory(shec)
 if (HAVE_BETTER_YASM_ELF64)
   add_subdirectory(isa)
   set(EC_ISA_LIB ec_isa)
-  set(EC_ISA_EMBEDDED_LIB cephd_ec_isa)
 endif (HAVE_BETTER_YASM_ELF64)
 
 add_library(erasure_code STATIC ErasureCodePlugin.cc)
@@ -37,10 +36,3 @@ add_custom_target(erasure_code_plugins DEPENDS
     ec_lrc
     ec_jerasure
     ec_shec)
-
-if(WITH_EMBEDDED)
-  include(MergeStaticLibraries)
-  add_library(cephd_ec_base STATIC $<TARGET_OBJECTS:erasure_code_objs>)
-  set_target_properties(cephd_ec_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-  merge_static_libraries(cephd_ec cephd_ec_base ${EC_ISA_EMBEDDED_LIB} cephd_ec_jerasure cephd_ec_lrc cephd_ec_shec)
-endif()
index 808d6a3ea511e9a3407ad383b27f709d7878340b..cc48921125344278f1eab1a7d81b9c7992ee2399 100644 (file)
@@ -65,8 +65,3 @@ target_link_libraries(ec_isa ${EXTRALIBS})
 set_target_properties(ec_isa PROPERTIES
   INSTALL_RPATH "")
 install(TARGETS ec_isa DESTINATION ${erasure_plugin_dir})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_ec_isa STATIC ${isa_srcs})
-  set_target_properties(cephd_ec_isa PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index 0641f457d49fcbb449c9f57b8e7205b4df3d6417..5eda591bac59a7442d8f6320961e1c89d30ef106 100644 (file)
@@ -65,8 +65,6 @@ int ErasureCodePluginIsa::factory(const std::string &directory,
     return 0;
 }
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 // -----------------------------------------------------------------------------
 
 const char *__erasure_code_version()
@@ -82,5 +80,3 @@ int __erasure_code_init(char *plugin_name, char *directory)
 
   return instance.add(plugin_name, new ErasureCodePluginIsa());
 }
-
-#endif
index 6da2040479977baaba843813a7d4de8e6f09f700..f9cd22e1176b269adc1030dbd11ce334119e76aa 100644 (file)
@@ -101,11 +101,3 @@ foreach(flavor ${jerasure_legacy_flavors})
   install(TARGETS ${plugin_name} DESTINATION ${erasure_plugin_dir})
   add_dependencies(ec_jerasure ${plugin_name})
 endforeach()
-
-if(WITH_EMBEDDED)
-  add_library(cephd_ec_jerasure STATIC
-    $<TARGET_OBJECTS:gf-complete_objs>
-    $<TARGET_OBJECTS:jerasure_objs>
-    ${jerasure_utils_src})
-  set_target_properties(cephd_ec_jerasure PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index 38f403826e76835ff7880760efcfc6a7f3e5ab4e..966c765565d9771ea18d28f41230b27ed40b1f96 100644 (file)
@@ -71,8 +71,6 @@ int ErasureCodePluginJerasure::factory(const std::string& directory,
     return 0;
 }
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
 
 int __erasure_code_init(char *plugin_name, char *directory)
@@ -85,5 +83,3 @@ int __erasure_code_init(char *plugin_name, char *directory)
   }
   return instance.add(plugin_name, new ErasureCodePluginJerasure());
 }
-
-#endif
\ No newline at end of file
index 2afdfad5aafae8dbb2636bdcebf0163943b636a1..e7fb8ea0247abf24da5e6f26bc7b4cb4ed6bc86a 100644 (file)
@@ -13,8 +13,3 @@ set_target_properties(ec_lrc PROPERTIES
   INSTALL_RPATH "")
 target_link_libraries(ec_lrc json_spirit)
 install(TARGETS ec_lrc DESTINATION ${erasure_plugin_dir})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_ec_lrc STATIC ${lrc_srcs})
-  set_target_properties(cephd_ec_lrc PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index b5699cd74b2f7ce934593fef1650a74ca514dc11..1731148ba6e37465b2c8a5f810f4aa756c9631dc 100644 (file)
@@ -39,8 +39,6 @@ int ErasureCodePluginLrc::factory(const std::string &directory,
     return 0;
 };
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
 
 int __erasure_code_init(char *plugin_name, char *directory)
@@ -48,5 +46,3 @@ int __erasure_code_init(char *plugin_name, char *directory)
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
   return instance.add(plugin_name, new ErasureCodePluginLrc());
 }
-
-#endif
index fd0f3be6efd6d9564749cc596104c3e4b8451bb1..0e699203d7c2e2e8bf4e873a1e572cbcb0e3de49 100644 (file)
@@ -31,9 +31,3 @@ foreach(flavor ${jerasure_legacy_flavors})
   install(TARGETS ${plugin_name} DESTINATION ${erasure_plugin_dir})
   add_dependencies(ec_shec ${plugin_name})
 endforeach()
-
-if(WITH_EMBEDDED)
-  # note we rely on the fact this will always be statically linked with jerasure
-  add_library(cephd_ec_shec STATIC ${shec_utils_srcs})
-  set_target_properties(cephd_ec_shec PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
index eb967f8d4637a73709af0492d43196f8c02d0384..b0ecf3f02b1c615819d05adcdf05bb24139ef313 100644 (file)
@@ -68,8 +68,6 @@ int ErasureCodePluginShec::factory(const std::string &directory,
     return 0;
 }
 
-#ifndef BUILDING_FOR_EMBEDDED
-
 const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
 
 int __erasure_code_init(char *plugin_name, char *directory = (char *)"")
@@ -82,5 +80,3 @@ int __erasure_code_init(char *plugin_name, char *directory = (char *)"")
   }
   return instance.add(plugin_name, new ErasureCodePluginShec());
 }
-
-#endif
\ No newline at end of file
diff --git a/src/include/cephd/libcephd.h b/src/include/cephd/libcephd.h
deleted file mode 100644 (file)
index 0ec6bb7..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#pragma once
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LIBCEPHD_VER_MAJOR 0
-#define LIBCEPHD_VER_MINOR 1
-#define LIBCEPHD_VER_PATCH 0
-
-#define LIBCEPHFD_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra)
-#define LIBCEPHFD_VERSION_CODE LIBCEPHD_VERSION(LIBCEPHD_VER_MAJOR, LIBCEPHD_VER_MINOR, LIBCEPHD_VER_PATCH)
-
-#define CEPH_LIBCEPHD_API __attribute__ ((visibility ("default")))
-
-/**
- * Get the API version of libcephd. We use semantic versioning
- * for the API:
- *
- * - incrementing major is for backwards-incompatible changes
- * - incrementing minor is for backwards-compatible changes
- * - incrementing extra is for bug fixes
- *
- * @param pmajor where to store the major version number
- * @param pminor where to store the minor version number
- * @param ppatch where to store the patch version number
- */
-CEPH_LIBCEPHD_API void cephd_version(int *pmajor, int *pminor, int *ppatch);
-
-/**
- * Gets the runtime version of ceph.
- *
- * @param pmajor where to store the major version number
- * @param pminor where to store the minor version number
- * @param ppatch where to store the patch version number
- */
-CEPH_LIBCEPHD_API const char *ceph_version(int *pmajor, int *pminor, int *ppatch);
-
-/**
- * Generates a new cluster id (fsid) and returns a hexadecimal string.
- *
- * @param context where to the store the handle
- * @param buf where to write the fsid
- * @param len the size of buf in bytes (should be at least 37)
- * @returns 0 on success, negative error code on failure
- * @returns -ERANGE if the buffer is too short to contain the key
-  */
-CEPH_LIBCEPHD_API int cephd_generate_fsid(char *buf, size_t len);
-
-/**
- * Generates a new secret key and returns a base64 encoded string.
- *
- * @param context where to the store the handle
- * @param buf where to write the fsid
- * @param len the size of buf in bytes
- * @returns 0 on success, negative error code on failure
- * @returns -ERANGE if the buffer is too short to contain the key
- */
-CEPH_LIBCEPHD_API int cephd_generate_secret_key(char *buf, size_t len);
-
-/**
- * Runs ceph-mon passing in command line args
- *
- * @param argc number of parameters
- * @param argv array of string arguments
- * @returns 0 on success, negative error code on failure
- */
-CEPH_LIBCEPHD_API int cephd_run_mon(int argc, const char **argv);
-
-/**
- * Runs ceph-osd passing in command line args
- *
- * @param argc number of parameters
- * @param argv array of string arguments
- * @returns 0 on success, negative error code on failure
- */
-CEPH_LIBCEPHD_API int cephd_run_osd(int argc, const char **argv);
-
-/**
- * Runs ceph-mds passing in command line args
- *
- * @param argc number of parameters
- * @param argv array of string arguments
- * @returns 0 on success, negative error code on failure
- */
-CEPH_LIBCEPHD_API int cephd_run_mds(int argc, const char **argv);
-
-/**
- * Runs ceph-rgw passing in command line args
- *
- * @param argc number of parameters
- * @param argv array of string arguments
- * @returns 0 on success, negative error code on failure
- */
-CEPH_LIBCEPHD_API int cephd_run_rgw(int argc, const char **argv);
-
-/**
- * Runs radosgw-admin passing in command line args
- *
- * @param argc number of parameters
- * @param argv array of string arguments
- * @returns 0 on success, negative error code on failure
- */
-CEPH_LIBCEPHD_API int cephd_run_rgw_admin(int argc, const char **argv);
-
-#ifdef __cplusplus
-}
-#endif
index 40eb1792a99e1ee843dda95a11093861dd1f128c..43cf24a07853712e37a2682ab9607ed703972a76 100644 (file)
 /* define if bluestore enabled */
 #cmakedefine WITH_BLUESTORE
 
-/* define if embedded enabled */
-#cmakedefine WITH_EMBEDDED
-
 /* define if cephfs enabled */
 #cmakedefine WITH_CEPHFS
 
index d0e217e30681a5b507ac46da885a443e43e3f69e..80ae69d2511cf584a4082e7811a3d8dd93b4210e 100644 (file)
@@ -13,7 +13,6 @@ extern "C" {
 
 #define CEPH_CLS_API [[gnu::visibility("default")]]
 
-#ifndef BUILDING_FOR_EMBEDDED
 #define CLS_VER(maj,min) \
 int __cls_ver__## maj ## _ ##min = 0; \
 int __cls_ver_maj = maj; \
@@ -25,12 +24,6 @@ const char *__cls_name = #name;
 
 #define CLS_INIT(name) \
 CEPH_CLS_API void __cls_init()
-#else
-#define CLS_VER(maj,min)
-#define CLS_NAME(name)
-#define CLS_INIT(name) \
-CEPH_CLS_API void name##_cls_init()
-#endif
 
 #define CLS_METHOD_RD       0x1 /// method executes read operations
 #define CLS_METHOD_WR       0x2 /// method executes write operations
index 2c65614479f1ade9dd36e171907a1a445845455b..0b17ede1ddcf6b670a76025da587ff4f7f3fa4bc 100644 (file)
@@ -5,8 +5,3 @@ set_target_properties(cls_kvs PROPERTIES
   SOVERSION "1"
   INSTALL_RPATH "")
 install(TARGETS cls_kvs DESTINATION ${CMAKE_INSTALL_LIBDIR}/rados-classes)
-
-if(WITH_EMBEDDED)
-  add_library(cephd_cls_kvs STATIC ${kvs_srcs})
-  set_target_properties(cephd_cls_kvs PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-endif()
diff --git a/src/libcephd/CMakeLists.txt b/src/libcephd/CMakeLists.txt
deleted file mode 100644 (file)
index 223184f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-include(MergeStaticLibraries)
-
-add_library(cephd_base STATIC
-  libcephd.cc
-  ../ceph_mon.cc
-  ../ceph_osd.cc
-  ../ceph_mds.cc)
-
-set_target_properties(cephd_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-
-set(merge_libs
-  cephd_base
-  cephd_compressor
-  cephd_ec
-  cephd_cls
-  cephd_cls_kvs
-  cephd_rados
-  common
-  common_utf8
-  erasure_code
-  global
-  json_spirit
-  kv
-  mds
-  mon
-  os
-  osd
-  osdc)
-
-if(NOT WITH_SYSTEM_ROCKSDB)
-  list(APPEND merge_libs ${ROCKSDB_LIBRARIES})
-endif(NOT WITH_SYSTEM_ROCKSDB)
-
-if(WITH_RADOSGW)
-  list(APPEND merge_libs cephd_rgw)
-endif(WITH_RADOSGW)
-
-if(WITH_RBD)
-  list(APPEND merge_libs cephd_rbd)
-endif(WITH_RBD)
-
-if(HAVE_ARMV8_CRC)
-  list(APPEND merge_libs common_crc_aarch64)
-endif(HAVE_ARMV8_CRC)
-
-merge_static_libraries(cephd ${merge_libs})
-
-# TODO: install these libraries and add them to rpm and deb packages
-#install(TARGETS cephd DESTINATION ${CMAKE_INSTALL_LIBDIR})
-#install(FILES ../include/cephd/libcephd.h
-#  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cephd)
diff --git a/src/libcephd/libcephd.cc b/src/libcephd/libcephd.cc
deleted file mode 100644 (file)
index 673942d..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-#include "acconfig.h"
-#include "auth/Auth.h"
-#include "auth/Crypto.h"
-#include "auth/KeyRing.h"
-#include "common/ceph_argparse.h"
-#include "common/version.h"
-#include "common/PluginRegistry.h"
-#include "compressor/snappy/CompressionPluginSnappy.h"
-#include "compressor/zlib/CompressionPluginZlib.h"
-#include "compressor/zstd/CompressionPluginZstd.h"
-#include "erasure-code/ErasureCodePlugin.h"
-#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64)
-#include "erasure-code/isa/ErasureCodePluginIsa.h"
-#endif
-#include "erasure-code/jerasure/ErasureCodePluginJerasure.h"
-#include "erasure-code/jerasure/jerasure_init.h"
-#include "erasure-code/lrc/ErasureCodePluginLrc.h"
-#include "erasure-code/shec/ErasureCodePluginShec.h"
-#include "include/cephd/libcephd.h"
-#include "global/global_context.h"
-#include "global/global_init.h"
-#include "objclass/objclass.h"
-#include "osd/OSD.h"
-#include "osd/ClassHandler.h"
-
-// forward declarations of RADOS class init functions
-CLS_INIT(cephfs);
-CLS_INIT(hello);
-CLS_INIT(journal);
-CLS_INIT(kvs);
-CLS_INIT(lock);
-CLS_INIT(log);
-CLS_INIT(lua);
-CLS_INIT(numops);
-CLS_INIT(rbd);
-CLS_INIT(refcount);
-CLS_INIT(rgw);
-CLS_INIT(statelog);
-CLS_INIT(timeindex);
-CLS_INIT(user);
-CLS_INIT(version);
-
-extern "C" void cephd_version(int *pmajor, int *pminor, int *ppatch)
-{
-  if (pmajor)
-    *pmajor = LIBCEPHD_VER_MAJOR;
-  if (pminor)
-    *pminor = LIBCEPHD_VER_MINOR;
-  if (ppatch)
-    *ppatch = LIBCEPHD_VER_PATCH;
-}
-
-extern "C" const char *ceph_version(int *pmajor, int *pminor, int *ppatch)
-{
-  int major, minor, patch;
-  const char *v = ceph_version_to_str();
-
-  int n = sscanf(v, "%d.%d.%d", &major, &minor, &patch);
-  if (pmajor)
-    *pmajor = (n >= 1) ? major : 0;
-  if (pminor)
-    *pminor = (n >= 2) ? minor : 0;
-  if (ppatch)
-    *ppatch = (n >= 3) ? patch : 0;
-  return v;
-}
-
-extern "C" int cephd_generate_fsid(char *buf, size_t len)
-{
-    if (len < sizeof("b06ad912-70d7-4263-a5ff-011462a5929a")) {
-        return -ERANGE;
-    }
-
-    uuid_d fsid;
-    fsid.generate_random();
-    fsid.print(buf);
-
-    return 0;
-}
-
-extern "C" int cephd_generate_secret_key(char *buf, size_t len)
-{
-    CephInitParameters iparams(CEPH_ENTITY_TYPE_MON);
-    CephContext *cct = common_preinit(iparams, CODE_ENVIRONMENT_LIBRARY, 0);
-    cct->_conf->apply_changes(NULL);
-    cct->init_crypto();
-
-    CryptoKey key;
-    key.create(cct, CEPH_CRYPTO_AES);
-
-    cct->put();
-
-    string keystr;
-    key.encode_base64(keystr);
-    if (keystr.length() >= len) {
-        return -ERANGE;
-    }
-    strcpy(buf, keystr.c_str());
-    return keystr.length();
-}
-
-// load the embedded plugins. This is safe to call multiple
-// times in the same process
-void cephd_preload_embedded_plugins()
-{
-  int r;
-
-  // load erasure coding plugins
-  {
-    ErasureCodePlugin* plugin;
-    ErasureCodePluginRegistry& reg = ErasureCodePluginRegistry::instance();
-    Mutex::Locker l(reg.lock);
-    reg.disable_dlclose = true;
-
-    // initialize jerasure (and gf-complete)
-    int w[] = { 4, 8, 16, 32 };
-    r = jerasure_init(4, w);
-    assert(r == 0);
-
-    plugin = new ErasureCodePluginJerasure();
-    r = reg.add("jerasure", plugin);
-    if (r == -EEXIST) {
-      delete plugin;
-    }
-    assert(r == 0);
-
-    plugin = new ErasureCodePluginLrc();
-    r = reg.add("lrc", plugin);
-    if (r == -EEXIST) {
-      delete plugin;
-    }
-    assert(r == 0);
-
-    plugin = new ErasureCodePluginShec();
-    r = reg.add("shec", plugin);
-    if (r == -EEXIST) {
-      delete plugin;
-    }
-    assert(r == 0);
-
-#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64)
-    plugin = new ErasureCodePluginIsa();
-    r = reg.add("isa", plugin);
-    if (r == -EEXIST) {
-      delete plugin;
-    }
-    assert(r == 0);
-#endif
-  }
-
-  // now load the compression plugins
-  {
-    Plugin *plugin;
-    PluginRegistry *reg = g_ceph_context->get_plugin_registry();
-    Mutex::Locker l(reg->lock);
-    reg->disable_dlclose = true;
-
-    plugin = new CompressionPluginSnappy(g_ceph_context);
-    r = reg->add("compressor", "snappy", plugin);
-    if (r == -EEXIST) {
-      delete plugin;
-    }
-    assert(r == 0);
-
-    plugin = new CompressionPluginZlib(g_ceph_context);
-    r = reg->add("compressor", "zlib", plugin);
-    if (r == -EEXIST) {
-      delete plugin;
-    }
-    assert(r == 0);
-
-    plugin = new CompressionPluginZstd(g_ceph_context);
-    r = reg->add("compressor", "zstd", plugin);
-    if (r == -EEXIST) {
-      delete plugin;
-    }
-    assert(r == 0);
-  }
-}
-
-void cephd_preload_rados_classes(OSD *osd)
-{
-  // intialize RADOS classes
-  {
-    ClassHandler  *class_handler = osd->class_handler;
-    Mutex::Locker l(class_handler->mutex);
-
-#ifdef WITH_CEPHFS
-    class_handler->add_embedded_class("cephfs");
-    cephfs_cls_init();
-#endif
-    class_handler->add_embedded_class("hello");
-    hello_cls_init();
-    class_handler->add_embedded_class("journal");
-    journal_cls_init();
-#ifdef WITH_KVS
-    class_handler->add_embedded_class("kvs");
-    kvs_cls_init();
-#endif
-    class_handler->add_embedded_class("lock");
-    lock_cls_init();
-    class_handler->add_embedded_class("log");
-    log_cls_init();
-    class_handler->add_embedded_class("lua");
-    lua_cls_init();
-    class_handler->add_embedded_class("numops");
-    numops_cls_init();
-#ifdef WITH_RBD
-    class_handler->add_embedded_class("rbd");
-    rbd_cls_init();
-#endif
-    class_handler->add_embedded_class("refcount");
-    refcount_cls_init();
-#ifdef WITH_RADOSGW
-    class_handler->add_embedded_class("rgw");
-    rgw_cls_init();
-#endif
-    class_handler->add_embedded_class("statelog");
-    statelog_cls_init();
-    class_handler->add_embedded_class("timeindex");
-    timeindex_cls_init();
-    class_handler->add_embedded_class("user");
-    user_cls_init();
-    class_handler->add_embedded_class("version");
-    version_cls_init();
-  }
-}
-
-extern "C" int cephd_mon(int argc, const char **argv);
-extern "C" int cephd_osd(int argc, const char **argv);
-extern "C" int cephd_mds(int argc, const char **argv);
-extern "C" int cephd_rgw(int argc, const char **argv);
-extern "C" int cephd_rgw_admin(int argc, const char **argv);
-
-int cephd_run_mon(int argc, const char **argv)
-{
-    return cephd_mon(argc, argv);
-}
-
-int cephd_run_osd(int argc, const char **argv)
-{
-    return cephd_osd(argc, argv);
-}
-
-int cephd_run_mds(int argc, const char **argv)
-{
-    return cephd_mds(argc, argv);
-}
-
-
-int cephd_run_rgw(int argc, const char **argv)
-{
-    return cephd_rgw(argc, argv);
-}
-
-int cephd_run_rgw_admin(int argc, const char **argv)
-{
-    return cephd_rgw_admin(argc, argv);
-}
index ee0ca49f5d48f64ed28067a09005fe04de072303..f15aa7d3029b2706cde9fbfd8c7a2efb36cbb82d 100644 (file)
@@ -37,11 +37,6 @@ endif()
 target_link_libraries(librados ${rados_libs})
 install(TARGETS librados DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
-if(WITH_EMBEDDED)
-  add_library(cephd_rados STATIC
-    $<TARGET_OBJECTS:librados_api_obj>
-    $<TARGET_OBJECTS:librados_objs>)
-endif()
 if(WITH_LTTNG AND WITH_EVENTTRACE)
   add_dependencies(librados_api_obj eventtrace_tp)
 endif()
index eabc67a63fa132abbea1fb5918c1bd2c0f9db39c..88682ef9c165428fe905fdfa8d3ce0e02f631234 100644 (file)
@@ -173,8 +173,3 @@ if(ENABLE_SHARED)
     endif()
 endif(ENABLE_SHARED)
 install(TARGETS librbd DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
-if(WITH_EMBEDDED)
-  add_library(cephd_rbd_base STATIC librbd.cc ${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc)
-  merge_static_libraries(cephd_rbd cephd_rbd_base rbd_internal rbd_types journal)
-endif()
index c9932fa96215b88844a0bd6cd75c2d05c6659fc9..7a0ffa19da482d3af75ebc2541a5bcbf26a043f5 100644 (file)
@@ -265,16 +265,3 @@ target_link_libraries(rgw PRIVATE
 set_target_properties(rgw PROPERTIES OUTPUT_NAME rgw VERSION 2.0.0
   SOVERSION 2)
 install(TARGETS rgw DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
-if(WITH_EMBEDDED)
-  include(MergeStaticLibraries)
-  add_library(cephd_rgw_base STATIC rgw_main.cc ${radosgw_admin_srcs})
-  if(WITH_RADOSGW_FCGI_FRONTEND)  
-    target_include_directories(cephd_rgw_base SYSTEM PUBLIC ${FCGI_INCLUDE_DIR})
-  endif()
-  set_target_properties(cephd_rgw_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
-  merge_static_libraries(cephd_rgw cephd_rgw_base rgw_a radosgw_a)
-  if(WITH_RADOSGW_FCGI_FRONTEND) 
-    target_link_libraries(cephd_rgw ${FCGI_LIBRARY})
-  endif()
-endif()
index bedebcf0d544f60c7f81c6064b538fc63cf4204d..f9bfc861d83133752f34eab284d4cb54e2ecd0b4 100644 (file)
@@ -2570,11 +2570,7 @@ static int scan_totp(CephContext *cct, ceph::real_time& now, rados::cls::otp::ot
   return -ENOENT;
 }
 
-#ifdef BUILDING_FOR_EMBEDDED
-extern "C" int cephd_rgw_admin(int argc, const char **argv)
-#else
 int main(int argc, const char **argv)
-#endif
 {
   vector<const char*> args;
   argv_to_vec(argc, (const char **)argv, args);
index 20148138dd8036aa0af8d196867ae895e8beab00..8bfccf1212a64bbe910825c4b1a672a5ee42a499 100644 (file)
@@ -161,11 +161,7 @@ static RGWRESTMgr *rest_filter(RGWRados *store, int dialect, RGWRESTMgr *orig)
 /*
  * start up the RADOS connection and then handle HTTP messages as they come in
  */
-#ifdef BUILDING_FOR_EMBEDDED
-extern "C" int cephd_rgw(int argc, const char **argv)
-#else
 int main(int argc, const char **argv)
-#endif
 {
   // dout() messages will be sent to stderr, but FCGX wants messages on stdout
   // Redirect stderr to stdout.
index eb92979d7a5991356401d3820a11e0a4dd2f6c62..36ddafd98dc2875cfb238956ff7eb06fa5d234a1 100644 (file)
@@ -30,9 +30,6 @@ add_subdirectory(erasure-code)
 add_subdirectory(filestore)
 add_subdirectory(fs)
 add_subdirectory(journal)
-if(WITH_EMBEDDED)
-  add_subdirectory(libcephd)
-endif(WITH_EMBEDDED)
 add_subdirectory(libcephfs)
 add_subdirectory(librados)
 add_subdirectory(librados_test_stub)
diff --git a/src/test/libcephd/CMakeLists.txt b/src/test/libcephd/CMakeLists.txt
deleted file mode 100644 (file)
index a12e8ea..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# cephdtest
-set(cephdtest_srcs
-  test.cc)
-add_library(cephdtest STATIC ${cephdtest_srcs})
-set_target_properties(cephdtest PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-#Enable spdk
-if(HAVE_SPDK)
-link_directories("${CMAKE_SOURCE_DIR}/src/spdk/build/lib/")
-endif(HAVE_SPDK)
-
-# ceph_test_cephd_api_misc
-add_executable(ceph_test_cephd_api_misc
-  misc.cc
-  )
-set_target_properties(ceph_test_cephd_api_misc PROPERTIES COMPILE_FLAGS
-  ${UNITTEST_CXX_FLAGS})
-target_link_libraries(ceph_test_cephd_api_misc
-       cephd global ${UNITTEST_LIBS} cephdtest z snappy ceph_zstd)
-
-install(TARGETS
-  ceph_test_cephd_api_misc
-  DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/src/test/libcephd/misc.cc b/src/test/libcephd/misc.cc
deleted file mode 100644 (file)
index 274699d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "gtest/gtest.h"
-#include "include/cephd/libcephd.h"
-
-TEST(LibCephdMiscVersion, Version) {
-  int major, minor, extra;
-  cephd_version(&major, &minor, &extra);
-}
diff --git a/src/test/libcephd/test.cc b/src/test/libcephd/test.cc
deleted file mode 100644 (file)
index aa90d10..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-void doNothing() {
-}