]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Remove embedded 'cephd' code 22864/head
authorDan Mick <dan.mick@redhat.com>
Wed, 9 May 2018 02:24:17 +0000 (19:24 -0700)
committerNathan Cutler <ncutler@suse.com>
Thu, 5 Jul 2018 06:33:20 +0000 (08:33 +0200)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
(cherry picked from commit 39b2626c7a36b3fef8d97cd276e23dc6f1f197f3)

Conflicts:
debian/rules
doc/dev/macos.rst
src/ceph_osd.cc
src/cls/CMakeLists.txt
src/compressor/CMakeLists.txt
src/compressor/brotli/CMakeLists.txt
src/compressor/brotli/CompressionPluginBrotli.cc
src/compressor/zlib/CMakeLists.txt
src/include/config-h.in.cmake
src/include/rados/objclass.h
src/libcephd/libcephd.cc
src/rgw/CMakeLists.txt

45 files changed:
CMakeLists.txt
README.alpine.md
alpine/APKBUILD.in
ceph.spec.in
cmake/modules/MergeStaticLibraries.cmake [deleted file]
debian/rules
do_freebsd.sh
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/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 aa90ba65dac3a9a333275b71752cb6d83fdd2ee7..80d3f7ac34c3d49976156fdd99e46e9acc4778fe 100644 (file)
@@ -254,13 +254,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 e82dd20a50cfd64613437b6091361e9151c777fd..e987a1e007d55b251d4786f3e255aafd7b6e1752 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 2f89a9bc1a1388404b6925eb78af3c28fbd358e4..d51501a3e2a02c350da24b554777933f11baba7b 100644 (file)
@@ -822,7 +822,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_SYSTEMD=ON \
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 9c63c99c31376ad5f233d239f27b8e06e791d451..99a3e8e9824c1100ad2e28a04aa42ad6c328f745 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
+extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON
 extraopts += -DWITH_CEPHFS_JAVA=ON
 # assumes that ceph is exmpt from multiarch support, so we override the libdir.
 extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
index bf9007488f06e31aecf6c44ca7bd3dcc28a4f6f3..946f83e572e5bb1813598f44eabf0a8a0925188f 100755 (executable)
@@ -38,7 +38,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 \
        2>&1 | tee cmake.log
 
index 3d4baae39d86653eccddfedaae9e7e7e79c0e1de..80d4b351f5d22422928e1beefbd14e131f09888c 100644 (file)
@@ -1145,7 +1145,3 @@ if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
 endif()
 
 add_subdirectory(script)
-
-if(WITH_EMBEDDED)
-  add_subdirectory(libcephd)
-endif()
index b6cff8348ebaa4ab7b751a60b700778619a3d312..7f68e5b521e5106bc8507cbc9fdac2222d184711 100644 (file)
@@ -88,11 +88,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 41a6ee0eb10a4b246d6f2df8eed6d862165b99a7..f3c52012e523fd57e0ecc45b5669dcebe569c1ee 100644 (file)
@@ -181,12 +181,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;
 
@@ -505,12 +500,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
   }
 
   MonitorDBStore *store = new MonitorDBStore(g_conf->mon_data);
index 1cfda9c1ddf35d71b79490ff954cce94b7f235d8..b2c8450658542454b7633da90c1dea1e33a1ada0 100644 (file)
@@ -96,13 +96,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);
@@ -262,9 +256,6 @@ int main(int argc, const char **argv)
     return -ENODEV;
   }
 
-#ifdef BUILDING_FOR_EMBEDDED
-  cephd_preload_embedded_plugins();
-#endif
 
   if (mkkey) {
     common_init_finish(g_ceph_context);
@@ -594,10 +585,8 @@ flushjournal_out:
     return -1;
   global_init_chdir(g_ceph_context);
 
-#ifndef BUILDING_FOR_EMBEDDED
   if (global_init_preload_erasure_code(g_ceph_context) < 0)
     return -1;
-#endif
 
   srand(time(NULL) + getpid());
 
@@ -638,10 +627,6 @@ flushjournal_out:
     return 1;
   }
 
-#ifdef BUILDING_FOR_EMBEDDED
-  cephd_preload_rados_classes(osd);
-#endif
-
   // install signal handlers
   init_async_signal_handler();
   register_async_signal_handler(SIGHUP, sighup_handler);
index 1c36c1fd0b5e77a899f1dbdb4464fc371352e8ae..e4474c0194de356ab3b1b5564e23764ae5264334 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)
@@ -16,7 +15,6 @@ set_target_properties(cls_hello PROPERTIES
   SOVERSION "1"
   INSTALL_RPATH "")
 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)
@@ -30,7 +28,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)
@@ -46,7 +43,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
@@ -64,7 +60,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_refcount
 set(cls_refcount_srcs
@@ -84,7 +79,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)
@@ -100,7 +94,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)
@@ -114,7 +107,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)
@@ -128,7 +120,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)
@@ -142,7 +133,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_replica_log
 set(cls_replica_log_srcs replica_log/cls_replica_log.cc)
@@ -176,7 +166,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
@@ -194,7 +183,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)
@@ -217,7 +205,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
@@ -235,7 +222,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
@@ -256,15 +242,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 8e0e61cdb91f256da8c6ddcdc17a7cedabbfacdd..9574d65574a15cc38a8895c2cb3c83c139173dd2 100644 (file)
@@ -27,18 +27,3 @@ endif()
 
 add_custom_target(compressor_plugins DEPENDS
     ${ceph_compressor_libs})
-
-if(WITH_EMBEDDED)
-  include(MergeStaticLibraries)
-  add_library(cephd_compressor_base STATIC ${compressor_srcs})
-  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()
-  merge_static_libraries(cephd_compressor ${cephd_compressor_libs})
-endif()
index 7a53000e9f742b4a45feb7bbbdb1c4b0581fb375..f5531a04f601a1164404d24c459d130b8921a301 100644 (file)
@@ -12,8 +12,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 8ce0bd04a30018ffd080c5a4131ec9e916a770f6..1cb6d50af6060f487d05cb62f2851ffec520026c 100644 (file)
@@ -12,8 +12,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 1b3bc259a3514811309d5c035dccb6717c8e3a21..037416c3d7fc57998af32be1804a3f2ce929af39 100644 (file)
@@ -46,9 +46,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 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 d9d2b6e560d3f7de863a21e8222f05dd7b076f1b..448d610cd0a2f2a393bf2ab1948ec88a991423fb 100644 (file)
@@ -37,8 +37,3 @@ add_dependencies(ceph_zstd ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
 target_link_libraries(ceph_zstd zstd)
 set_target_properties(ceph_zstd PROPERTIES VERSION 2.0.0 SOVERSION 2)
 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 450ec716973eb2de4300f8917122042f415ad331..1b4870403a366962214cbb97ec04ec4ab7d05ec4 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)
@@ -38,10 +37,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 e0a511e0a8e4240e4551554de102cd65978a066b..6fcbb48894af00cd71a850f3789c8aa84cdb8f66 100644 (file)
@@ -66,8 +66,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 7f752806cda7fa172ba10ea1b1190969e95327d6..cf2c6e0fbf7ac6c558717c5889899d9426f82382 100644 (file)
@@ -102,11 +102,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 c25fc695f2fa273fcf82a18ef05199e04339206f..5d2eaeceffdcf9e79b7576fb196c4405f2e410f9 100644 (file)
@@ -14,8 +14,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 d5f8e15ada4a694b46827d6fd7920edd1803f5c8..1793b127ecd51a812a7d3fac3641dac0a635e376 100644 (file)
@@ -33,9 +33,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 0b6b5248842fa2a8a2330ec41fd15eb9d86e1391..19f1d0a5fe40ca3ec8220e14af99443cfbc31da4 100644 (file)
 /* ibverbs experimental conditional compilation */
 #cmakedefine HAVE_IBV_EXP
 
-/* define if embedded enabled */
-#cmakedefine WITH_EMBEDDED
-
 /* define if cephfs enabled */
 #cmakedefine WITH_CEPHFS
 
index ea07dfc790aefc9708bced9dd90082ae6ab18067..e61ce8163eb4d9540aba42e8ad682e0199ecba37 100644 (file)
@@ -11,7 +11,6 @@
 extern "C" {
 #endif
 
-#ifndef BUILDING_FOR_EMBEDDED
 #define CLS_VER(maj,min) \
 int __cls_ver__## maj ## _ ##min = 0; \
 int __cls_ver_maj = maj; \
@@ -22,12 +21,6 @@ int __cls_name__## name = 0; \
 const char *__cls_name = #name;
 #define CLS_INIT(name) \
 void CEPH_CLS_API __cls_init()
-#else
-#define CLS_VER(maj,min)
-#define CLS_NAME(name)
-#define CLS_INIT(name) \
-void CEPH_CLS_API 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 71b0767..0000000
+++ /dev/null
@@ -1,262 +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(replica_log);
-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();
-    class_handler->add_embedded_class("replica_log");
-    replica_log_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 d8b48256e94a0ae860e601db77179aa597d7b283..e9e402400d6885f1b2d0495d2ee61e013fcb2b49 100644 (file)
@@ -35,11 +35,6 @@ else(ENABLE_SHARED)
 endif(ENABLE_SHARED)
 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 1b04ec91ab81f5b0051f99cb28d2cec0b11a3d77..072eaed491fec88f8a6a88d22445caf62756ab9e 100644 (file)
@@ -139,8 +139,3 @@ if(ENABLE_SHARED)
     LINK_FLAGS "-Wl,--exclude-libs,ALL")
 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 b3aa4e38ada85425af6fa0569e59510934e5b099..ff2d2d8a12045deb7b263c3b44c90b0eb95b9904 100644 (file)
@@ -257,16 +257,3 @@ target_link_libraries(rgw LINK_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 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 350875984125895fa3aa0e19535b5525340f4ad1..6353802a1b875e14416b4884bd82ebd87576a7f2 100644 (file)
@@ -2498,11 +2498,7 @@ int create_new_bucket_instance(RGWRados *store,
 }
 
 
-#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 ad5848924dbe4a591ec3b67cea14f1416d6dc1aa..8f4b6a917b025b0878a4a25107260becd08db4df 100644 (file)
@@ -184,11 +184,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 aad733c9a4f5689ab829a9008fe2e47c4b542f58..66e24b8bc96d0fb6df1e8b2b74cc756f4e5b028a 100644 (file)
@@ -32,9 +32,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() {
-}