diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2021-02-25 16:35:22 -0800 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2021-02-25 16:44:08 -0800 |
commit | 113ee30b5fbc92ced3160824d5d7c0dd2881e40a (patch) | |
tree | 5ecb528910a775003757c3f05012c74a11919ec9 /sys-cluster/ceph/files | |
parent | dev-libs/rocksdb: Version bump, rm old, gflags dep (bug #755662) (diff) | |
download | gentoo-113ee30b5fbc92ced3160824d5d7c0dd2881e40a.tar.gz gentoo-113ee30b5fbc92ced3160824d5d7c0dd2881e40a.tar.bz2 gentoo-113ee30b5fbc92ced3160824d5d7c0dd2881e40a.zip |
sys-cluster/ceph-15.2.9: Version bump
- Add patch to avoid SSE 4.1 functions when SSE 4.1 is disabled (bug
#701618)
- Don't call objdump directly (bug #733814)
- Drop libressl support (closes bug #724522)
- Add a dep on the new pmdk package (bug #52177)
Closes: https://bugs.gentoo.org/701618
Bug: https://bugs.gentoo.org/733814
Closes: https://bugs.gentoo.org/724522
Closes: https://bugs.gentoo.org/752177
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'sys-cluster/ceph/files')
-rw-r--r-- | sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch | 22 | ||||
-rw-r--r-- | sys-cluster/ceph/files/rbdmap.initd-r1 | 122 |
2 files changed, 144 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch b/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch new file mode 100644 index 000000000000..e9439a630185 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch @@ -0,0 +1,22 @@ +diff --git a/src/compressor/zlib/ZlibCompressor.cc b/src/compressor/zlib/ZlibCompressor.cc +index e3064d2a21..c86b19da6c 100644 +--- a/src/compressor/zlib/ZlibCompressor.cc ++++ b/src/compressor/zlib/ZlibCompressor.cc +@@ -107,7 +107,7 @@ int ZlibCompressor::zlib_compress(const bufferlist &in, bufferlist &out) + return 0; + } + +-#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) ++#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) && defined(HAVE_INTEL_SSE4_1) + int ZlibCompressor::isal_compress(const bufferlist &in, bufferlist &out) + { + int ret; +@@ -167,7 +167,7 @@ int ZlibCompressor::compress(const bufferlist &in, bufferlist &out) + if (qat_enabled) + return qat_accel.compress(in, out); + #endif +-#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) ++#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) && defined(HAVE_INTEL_SSE4_1) + if (isal_enabled) + return isal_compress(in, out); + else diff --git a/sys-cluster/ceph/files/rbdmap.initd-r1 b/sys-cluster/ceph/files/rbdmap.initd-r1 new file mode 100644 index 000000000000..f3f2ea526e4b --- /dev/null +++ b/sys-cluster/ceph/files/rbdmap.initd-r1 @@ -0,0 +1,122 @@ +#!/sbin/openrc-run + +DESC="RBD Mapping:" +RBDMAPFILE="/etc/ceph/rbdmap" + +extra_started_commands="reload" + +depend() { + need localmount net + before netmount +} + +start() { + + if [ ! -f "${RBDMAPFILE}" ]; then + ewarn "$DESC : No ${RBDMAPFILE} found." + exit 0 + fi + + RET=0 + # Read /etc/ceph/rbdmap to create non-existant mapping + while read DEV PARAMS; do + case "$DEV" in + ""|\#*) + continue + ;; + */*) + ;; + *) + DEV=rbd/$DEV + ;; + esac + ebegin "${DESC} '${DEV}'" + newrbd="" + MAP_RV="" + RET_OP=0 + OIFS=$IFS + IFS=',' + for PARAM in ${PARAMS}; do + CMDPARAMS="${CMDPARAMS} --$(printf '%s\n' "${PARAM}" | tr '=' ' ')" + done + IFS=$OIFS + if [ ! -b /dev/rbd/${DEV} ]; then + MAP_RV=$(rbd map ${DEV} ${CMDPARAMS} 2>&1) + if [ $? -eq 0 ]; then + newrbd="yes" + else + RET=$((${RET}+$?)) + RET_OP=1 + fi + fi + eend ${RET_OP} "${MAP_RV}" + + if [ "$newrbd" ]; then + ## Mount new rbd + MNT_RV="" + mount --fake /dev/rbd/${DEV} >>/dev/null 2>&1 \ + && MNT_RV=$(mount -vn /dev/rbd/${DEV} 2>&1) + [ -n "${MNT_RV}" ] && einfo "mount: ${MNT_RV}" + + ## post-mapping + if [ -x "/etc/ceph/rbd.d/${DEV}" ]; then + einfo "RBD Running post-map hook '/etc/ceph/rbd.d/${DEV}'" + /etc/ceph/rbd.d/${DEV} map "/dev/rbd/${DEV}" + fi + fi + done < ${RBDMAPFILE} + eend ${RET} +} + +stop() { + + RET=0 + ## Unmount and unmap all rbd devices + if ls /dev/rbd[0-9]* >/dev/null 2>&1; then + for DEV in /dev/rbd[0-9]*; do + ## pre-unmapping + for L in $(find /dev/rbd -type l); do + LL="${L##/dev/rbd/}" + if [ "$(readlink -f $L)" = "${DEV}" ] \ + && [ -x "/etc/ceph/rbd.d/${LL}" ]; then + einfo "RBD pre-unmap: '${DEV}' hook '/etc/ceph/rbd.d/${LL}'" + /etc/ceph/rbd.d/${LL} unmap "$L" + break + fi + done + + ebegin "Unmapping RBD device: '${DEV}'" + UMNT_RV="" + UMAP_RV="" + RET_OP=0 + MNT=$(findmnt --mtab --source ${DEV} --noheadings | awk '{print $1'}) + if [ -n "${MNT}" ]; then + einfo "un-mounting '${MNT}'" + UMNT_RV=$(umount "${MNT}" 2>&1) + fi + if mountpoint -q "${MNT}"; then + ## Un-mounting failed. + RET_OP=1 + RET=$((${RET}+1)) + else + ## Un-mapping. + UMAP_RV=$(rbd unmap $DEV 2>&1) + if [ $? -ne 0 ]; then + RET=$((${RET}+$?)) + RET_OP=1 + fi + fi + eend ${RET_OP} "${UMAP_RV}" + [ -n "${UMNT_RV}" ] && einfo "${UMNT_RV}" + done + fi + eend ${RET} +} + +reload() { + start +} + +status() { + rbd showmapped +} |