ceph: use the sources from upstream git repos
There are about 30 patches made in upstream stx-ceph not added in our recipe, and the ceph-mgr-restful issue was already fixed by one of these patches: https://github.com/starlingx-staging/stx-ceph/pull/29 So in order to avoid other issues that has been fixed in upstream stx-ceph, do the following to align with stx 3.0: - Change to use the sources from stx-ceph git repos. - Use the sources for third party libs required by ceph from ceph git repos. - Remove the patch 0005-Add-hooks-for-orderly-shutdown-on-controller.patch since it's already included in the source of stx-ceph. - Fix the hard coded path of libdir in init scripts. Closes-bug: 1905376 Change-Id: I18e72d79fc06c3a9b0bceceba7da10c6d220958f Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
This commit is contained in:
parent
587e1dbcf2
commit
a60eb42a1d
@ -1,59 +0,0 @@
|
||||
From 1f882d7ee20d70548d380ce27eedab3ae30180d4 Mon Sep 17 00:00:00 2001
|
||||
From: Jackie Huang <jackie.huang@windriver.com>
|
||||
Date: Fri, 17 Apr 2020 00:55:52 +0800
|
||||
Subject: [PATCH] Add hooks for orderly shutdown on controller
|
||||
|
||||
Hook the ceph init script to add systemd overrides to define
|
||||
an orderly shutdown for StarlingX controllers.
|
||||
|
||||
Signed-off-by: Don Penney <don.penney@windriver.com>
|
||||
---
|
||||
src/init-ceph.in | 32 ++++++++++++++++++++++++++++++++
|
||||
1 file changed, 32 insertions(+)
|
||||
|
||||
diff --git a/src/init-ceph.in b/src/init-ceph.in
|
||||
index d13032a..a6113fa 100755
|
||||
--- a/src/init-ceph.in
|
||||
+++ b/src/init-ceph.in
|
||||
@@ -434,6 +434,38 @@ for name in $what; do
|
||||
continue
|
||||
fi
|
||||
|
||||
+ . /etc/platform/platform.conf
|
||||
+ if [ "${nodetype}" = "controller" ]; then
|
||||
+ # StarlingX: Hook the transient services launched by systemd-run
|
||||
+ # to allow for proper cleanup and orderly shutdown
|
||||
+
|
||||
+ # Set nullglob so wildcards will return empty string if no match
|
||||
+ shopt -s nullglob
|
||||
+
|
||||
+ OSD_SERVICES=$(for svc in /run/systemd/system/ceph-osd*.service; do basename $svc; done | xargs echo)
|
||||
+ for d in /run/systemd/system/ceph-osd*.d; do
|
||||
+ cat <<EOF > $d/starlingx-overrides.conf
|
||||
+[Unit]
|
||||
+Before=docker.service
|
||||
+After=sm-shutdown.service
|
||||
+
|
||||
+EOF
|
||||
+ done
|
||||
+
|
||||
+ for d in /run/systemd/system/ceph-mon*.d; do
|
||||
+ cat <<EOF > $d/starlingx-overrides.conf
|
||||
+[Unit]
|
||||
+Before=docker.service
|
||||
+After=sm-shutdown.service ${OSD_SERVICES}
|
||||
+
|
||||
+EOF
|
||||
+ done
|
||||
+
|
||||
+ shopt -u nullglob
|
||||
+
|
||||
+ systemctl daemon-reload
|
||||
+ fi
|
||||
+
|
||||
[ -n "$post_start" ] && do_cmd "$post_start"
|
||||
[ -n "$lockfile" ] && [ "$?" -eq 0 ] && touch $lockfile
|
||||
;;
|
||||
--
|
||||
2.7.4
|
||||
|
@ -20,13 +20,99 @@ DEPENDS = "\
|
||||
snappy udev valgrind xfsprogs zlib \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
BRANCH = "stx/v${PV}"
|
||||
SRCREV = "7567060fea1f8d719d317277f1eb01161cf3bfef"
|
||||
|
||||
BRANCH_lua = "lua-5.3-ceph"
|
||||
SRCREV_lua = "1fce39c6397056db645718b8f5821571d97869a4"
|
||||
DESTSUF_lua = "git/src/lua"
|
||||
|
||||
BRANCH_ceph-object-corpus = "master"
|
||||
SRCREV_ceph-object-corpus = "e32bf8ca3dc6151ebe7f205ba187815bc18e1cef"
|
||||
DESTSUF_ceph-object-corpus = "git/ceph-object-corpus"
|
||||
|
||||
BRANCH_civetweb = "ceph-mimic"
|
||||
SRCREV_civetweb = "ff2881e2cd5869a71ca91083bad5d12cccd22136"
|
||||
DESTSUF_civetweb = "git/src/civetweb"
|
||||
|
||||
BRANCH_jerasure = "v2-ceph"
|
||||
SRCREV_jerasure = "96c76b89d661c163f65a014b8042c9354ccf7f31"
|
||||
DESTSUF_jerasure = "git/src/erasure-code/jerasure/jerasure"
|
||||
|
||||
BRANCH_gf-complete = "v3-ceph"
|
||||
SRCREV_gf-complete = "7e61b44404f0ed410c83cfd3947a52e88ae044e1"
|
||||
DESTSUF_gf-complete = "git/src/erasure-code/jerasure/gf-complete"
|
||||
|
||||
BRANCH_xxHash = "master"
|
||||
SRCREV_xxHash = "1f40c6511fa8dd9d2e337ca8c9bc18b3e87663c9"
|
||||
DESTSUF_xxHash = "git/src/xxHash"
|
||||
|
||||
# the tag v1.3.2 is not on any branch
|
||||
BRANCH_zstd = "nobranch=1"
|
||||
SRCREV_zstd = "f4340f46b2387bc8de7d5320c0b83bb1499933ad"
|
||||
DESTSUF_zstd = "git/src/zstd"
|
||||
|
||||
BRANCH_rocksdb = "ceph-mimic"
|
||||
SRCREV_rocksdb = "f4a857da0b720691effc524469f6db895ad00d8e"
|
||||
DESTSUF_rocksdb = "git/src/rocksdb"
|
||||
|
||||
BRANCH_ceph-erasure-code-corpus = "master"
|
||||
SRCREV_ceph-erasure-code-corpus = "2d7d78b9cc52e8a9529d8cc2d2954c7d375d5dd7"
|
||||
DESTSUF_ceph-erasure-code-corpus = "git/ceph-erasure-code-corpus"
|
||||
|
||||
BRANCH_spdk = "wip-25032-mimic"
|
||||
SRCREV_spdk = "f474ce6930f0a44360e1cc4ecd606d2348481c4c"
|
||||
DESTSUF_spdk = "git/src/spdk"
|
||||
|
||||
BRANCH_isa-l = "master"
|
||||
SRCREV_isa-l = "7e1a337433a340bc0974ed0f04301bdaca374af6"
|
||||
DESTSUF_isa-l = "git/src/isa-l"
|
||||
|
||||
BRANCH_blkin = "master"
|
||||
SRCREV_blkin = "f24ceec055ea236a093988237a9821d145f5f7c8"
|
||||
DESTSUF_blkin = "git/src/blkin"
|
||||
|
||||
BRANCH_rapidjson = "master"
|
||||
SRCREV_rapidjson = "f54b0e47a08782a6131cc3d60f94d038fa6e0a51"
|
||||
DESTSUF_rapidjson = "git/src/rapidjson"
|
||||
|
||||
BRANCH_googletest = "ceph-release-1.7.x"
|
||||
SRCREV_googletest = "fdb850479284e2aae047b87df6beae84236d0135"
|
||||
DESTSUF_googletest = "git/src/googletest"
|
||||
|
||||
BRANCH_crypto = "master"
|
||||
SRCREV_crypto = "603529a4e06ac8a1662c13d6b31f122e21830352"
|
||||
DESTSUF_crypto = "git/src/crypto/isa-l/isa-l_crypto"
|
||||
|
||||
BRANCH_rapidjson-gtest = "ceph-release-1.7.x"
|
||||
SRCREV_rapidjson-gtest = "0a439623f75c029912728d80cb7f1b8b48739ca4"
|
||||
DESTSUF_rapidjson-gtest = "git/src/rapidjson/thirdparty/gtest"
|
||||
|
||||
|
||||
SRC_URI = "\
|
||||
http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
|
||||
git://github.com/starlingx-staging/stx-ceph.git;branch=${BRANCH} \
|
||||
git://github.com/ceph/lua;name=lua;branch=${BRANCH_lua};destsuffix=${DESTSUF_lua} \
|
||||
git://github.com/ceph/ceph-object-corpus;name=ceph-object-corpus;branch=${BRANCH_ceph-object-corpus};destsuffix=${DESTSUF_ceph-object-corpus} \
|
||||
git://github.com/ceph/civetweb;name=civetweb;branch=${BRANCH_civetweb};destsuffix=${DESTSUF_civetweb} \
|
||||
git://github.com/ceph/jerasure;name=jerasure;branch=${BRANCH_jerasure};destsuffix=${DESTSUF_jerasure} \
|
||||
git://github.com/ceph/gf-complete;name=gf-complete;branch=${BRANCH_gf-complete};destsuffix=${DESTSUF_gf-complete} \
|
||||
git://github.com/ceph/xxHash;name=xxHash;branch=${BRANCH_xxHash};destsuffix=${DESTSUF_xxHash} \
|
||||
git://github.com/facebook/zstd;name=zstd;${BRANCH_zstd};destsuffix=${DESTSUF_zstd} \
|
||||
git://github.com/ceph/rocksdb;name=rocksdb;branch=${BRANCH_rocksdb};destsuffix=${DESTSUF_rocksdb} \
|
||||
git://github.com/ceph/ceph-erasure-code-corpus;name=ceph-erasure-code-corpus;branch=${BRANCH_ceph-erasure-code-corpus};destsuffix=${DESTSUF_ceph-erasure-code-corpus} \
|
||||
git://github.com/ceph/spdk;name=spdk;branch=${BRANCH_spdk};destsuffix=${DESTSUF_spdk} \
|
||||
git://github.com/ceph/isa-l;name=isa-l;branch=${BRANCH_isa-l};destsuffix=${DESTSUF_isa-l} \
|
||||
git://github.com/intel/isa-l_crypto;name=crypto;branch=${BRANCH_crypto};destsuffix=${DESTSUF_crypto} \
|
||||
git://github.com/ceph/blkin;name=blkin;branch=${BRANCH_blkin};destsuffix=${DESTSUF_blkin} \
|
||||
git://github.com/ceph/rapidjson;name=rapidjson;branch=${BRANCH_rapidjson};destsuffix=${DESTSUF_rapidjson} \
|
||||
git://github.com/ceph/googletest;name=googletest;branch=${BRANCH_googletest};destsuffix=${DESTSUF_googletest} \
|
||||
git://github.com/ceph/googletest;name=rapidjson-gtest;branch=${BRANCH_rapidjson-gtest};destsuffix=${DESTSUF_rapidjson-gtest} \
|
||||
\
|
||||
file://0001-Correct-the-path-to-find-version.h-in-rocksdb.patch \
|
||||
file://0002-zstd-fix-error-for-cross-compile.patch \
|
||||
file://0003-ceph-add-pybind-support-in-OE.patch \
|
||||
file://0004-ceph-detect-init-correct-the-installation-for-OE.patch \
|
||||
file://0005-Add-hooks-for-orderly-shutdown-on-controller.patch \
|
||||
\
|
||||
file://ceph-init-wrapper.sh \
|
||||
file://ceph-manage-journal.py \
|
||||
@ -40,8 +126,6 @@ SRC_URI = "\
|
||||
file://mgr-restful-plugin.service \
|
||||
file://starlingx-docker-override.conf \
|
||||
"
|
||||
SRC_URI[md5sum] = "ce118be451dcb6b89e9e0a45057827dd"
|
||||
SRC_URI[sha256sum] = "f3a61db4c90e00c38a2dac7239b956ec367ef56f601e07335ed3011f931d8840"
|
||||
|
||||
inherit cmake pythonnative python-dir systemd
|
||||
|
||||
@ -86,6 +170,7 @@ EXTRA_OECMAKE = "\
|
||||
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
|
||||
-DWITH_SYSTEM_BOOST=ON \
|
||||
-DWITH_SYSTEM_ROCKSDB=ON \
|
||||
-DCMAKE_INSTALL_INITCEPH=${sysconfdir}/init.d \
|
||||
"
|
||||
|
||||
do_configure_prepend () {
|
||||
@ -93,6 +178,8 @@ do_configure_prepend () {
|
||||
echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake
|
||||
echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake
|
||||
ln -sf ${STAGING_LIBDIR}/libboost_python27.so ${STAGING_LIBDIR}/libboost_python.so
|
||||
echo ${SRCREV} > ${S}/src/.git_version
|
||||
echo v${PV} >> ${S}/src/.git_version
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
@ -169,7 +256,8 @@ do_install_append () {
|
||||
install -m 0750 -D ${S}/src/init-rbdmap ${D}${sysconfdir}/init.d/rbdmap
|
||||
install -m 0750 -D ${B}/bin/init-ceph ${D}${sysconfdir}/rc.d/init.d/ceph
|
||||
install -m 0750 -D ${B}/bin/init-ceph ${D}${sysconfdir}/init.d/ceph
|
||||
install -d -m 0750 ${D}${localstatedir}/log/radosgw
|
||||
sed -i -e 's|/usr/lib64|${libdir}|' ${D}${sysconfdir}/init.d/ceph ${D}${sysconfdir}/rc.d/init.d/ceph
|
||||
install -d -m 0750 ${D}${localstatedir}/log/radosgw
|
||||
}
|
||||
|
||||
PACKAGES += " \
|
||||
|
Loading…
Reference in New Issue
Block a user