Skip to content

Commit

Permalink
Remove embedded 'cephd' code
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Mick <[email protected]>
  • Loading branch information
dmick committed May 11, 2018
1 parent ce7afd4 commit 39b2626
Show file tree
Hide file tree
Showing 48 changed files with 3 additions and 771 deletions.
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions README.alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

Expand Down
1 change: 0 additions & 1 deletion alpine/APKBUILD.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
85 changes: 0 additions & 85 deletions cmake/modules/MergeStaticLibraries.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion do_freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion doc/dev/macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,3 @@ if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
endif()

add_subdirectory(script)

if(WITH_EMBEDDED)
add_subdirectory(libcephd)
endif()
4 changes: 0 additions & 4 deletions src/ceph_mds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
9 changes: 0 additions & 9 deletions src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
Expand Down
15 changes: 0 additions & 15 deletions src/ceph_osd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -635,11 +626,9 @@ int main(int argc, const char **argv)
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,
Expand Down Expand Up @@ -686,10 +675,6 @@ int main(int argc, const char **argv)
}


#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);

Expand Down
27 changes: 0 additions & 27 deletions src/cls/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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()
Loading

0 comments on commit 39b2626

Please sign in to comment.