diff options
Diffstat (limited to 'sys-cluster/ceph')
-rw-r--r-- | sys-cluster/ceph/Manifest | 3 | ||||
-rw-r--r-- | sys-cluster/ceph/ceph-12.2.4-r1.ebuild (renamed from sys-cluster/ceph/ceph-12.2.4.ebuild) | 2 | ||||
-rw-r--r-- | sys-cluster/ceph/files/ceph.initd-r8 | 95 |
3 files changed, 98 insertions, 2 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index a1a4b7e81572..9ff6b751b31b 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -38,6 +38,7 @@ AUX ceph.initd-r4 1189 BLAKE2B 065554902fdd5c44fff69868e72817ee24916c6f93a3e332b AUX ceph.initd-r5 2178 BLAKE2B d943da59449e796a9c592e173654275b40ba3701fd6c694521a1975e3070ee465b9dbc2ba748cbd99d94e00a82d792ca88f6b4c1cd299572bdd3d8829adcedbe SHA512 4037639b6de65e0966f1aa850778b87f4f8f926af621f68155e98f103e233b7ebb2fba18a65ca150b16767bb80581259f4720c925ed00777d640f19471147c90 AUX ceph.initd-r6 2180 BLAKE2B c262225412e6e5bf61d315f661721c27f97726dd5eb4cb8696845c29ab95d2ad29b011db6e8d488ce58d71ac875008588737a453de8472ef7f6bb9309fd4f100 SHA512 9f19186da7a6150b4d371fdd5523a07979ef9c318242422f04ed0178b33e6886ac1333cad8a41aa0d75af2aa08d7ee8ec9075d980d32fcddc8558d143a425a01 AUX ceph.initd-r7 2197 BLAKE2B 7df3ab975cd14a3cc782ed58f8e6c2f0bfdc3f1b96383400490d7cab27b4d5afa6381cdb02843c1bbfe30f62e5d801ccecf2b61178013855e13ec504da84aa4c SHA512 93890b9e049ff5925ce56b524389873e22560315bf25c40ac86ec11dd2375d184215e7a217d863d4e32bb817a3e0577fdea71a76bb5d5c28ecbeb8544f1b763c +AUX ceph.initd-r8 2357 BLAKE2B 24cda98e71748cdb4db4ceb7e26c2647734756c2586dce5bcca5d4de0d548c85626bd4a7d1a67b22664457a34561fdd1e510a4b0a6400616b76a857abd3c9b2f SHA512 8ebea5ae1a6b0c5641171cea1c4288919886e71e03c0accfbdba9ddf3989f14999dfe5933893aa116d47b1984539fab0b5000367fb90e105b8f60b4b92fe7454 AUX ceph.logrotate 427 BLAKE2B 9677f1a2a4872addff71527c800dd06bf65e18b589de3869e2a742c43070de789d5089f8739367efb913a64aeec5a8b82f47c129fac580e7c34e4f8cdc8b7332 SHA512 6edace611f46683ca3b8d2154b86ec77cc241909704e0362b728a5f51c2a809c22e83d69df0d58ec6b3a6b8dc8ef2518c220cac920f51e63fe668cdfe1b48bae AUX envd-tcmalloc 48 BLAKE2B 4a0799ac6bbedfe5e701eead67600312d86f06143dbfd11d2c594c03d09bf13dfa645e5a0bde1189211ad20036dc4fcfce6758d3a5829d943eb337cc65783af9 SHA512 d180b1a888ec6d870ff523a3b10fd00eca479ee2586a236458af5ffaba21c84e7b8098da6d4bc08fb86c82c61a861dd3c3596a01063d734c329a92808682fc8c AUX rbdmap.initd 2373 BLAKE2B b88d79efc722e2de3d1f0269664a976ed45fbb0a1c9d46fcfd058ea64d3ae7fe27d13455f2ac5ca06663d77cfac1d2f9d86d12bba926541042ac09a8778a3a52 SHA512 bbd48d6987e52eaf6d02bccf3aecd06596465af4d3ac93063f9a814106de162a27bf1a33ae1646e669efb3c754f3ba57f395523293ad643b0d81ee588252216b @@ -60,5 +61,5 @@ EBUILD ceph-10.2.9.ebuild 7150 BLAKE2B a9300913b99b4770fc85dec74cdb38b18b466272d EBUILD ceph-12.2.1.ebuild 7338 BLAKE2B cd4cccedaeb34e9057da645ba7640e1577b593dda3f3bf579c9f191a1c0cca616aa92f9c7dc2768bbf0ff2720ce62295ccd0bcf518a69f1d449b1bafb29473b1 SHA512 db604a52bc5302e0efee5cb3cae654dff61b7d9709d2f4ec0505ed56f7f82b3f7f7387f34c0738ed3143bdb77c90086b922e7bc891f3bc246149354644ab2179 EBUILD ceph-12.2.2-r1.ebuild 7315 BLAKE2B 4ea06a4679902338bcfc631f16c3d3fe60efa59baee88d06579fbc54b4ffe12ac6b003551edbbd18f1ee3c42814c64f4efa948dec2a2881231620b2f0a5acc91 SHA512 806d2a6ce722da06e6430bc4e7b6091e858333b84631690d3b6702c0c158618a09368ec352b563c437ce8253cdf38a487011b6601ee78ce4adfe148191c303f4 EBUILD ceph-12.2.2.ebuild 7315 BLAKE2B dee5111ca1f52b26f49f27384bbff20d339ab9dd9ad4eba77709f2f9af59c42480f1d55324e8691b9b86b7ee2615a68c473d2d389355c7d57fc2b2b19672f980 SHA512 af0421ed063be53baa3daef7a8ec0b9c7bfdf66180afa483ed3459a664fce463b4de65a23869577f616ff4149a40e8223ed27de792bbb2a9b001bf9baaed39ab -EBUILD ceph-12.2.4.ebuild 7830 BLAKE2B 0fe909963c63f532cb7741f5945c53dcd848132ce8615e7da02036d81f237c78802d259de5ffb88197c434f68afdbf7c4d19b157ed9618d85e7c1668a692861f SHA512 d3fa0d44c471f542b8fd9a37823a16440719d163e6e8ce34980bb2021ac6b31432ac3a7032908807e87208b2324aff38f77b863f593e9bf25c46cb94d0b9e606 +EBUILD ceph-12.2.4-r1.ebuild 7830 BLAKE2B e4e2dba7a611a151ea8b766093608cad1e403e5d4db4f997e7f00f6256fc59386085b8c25d7b64e68b028cb5a5ee7835fff522ef7ec234dc4cf71d70d0e4c910 SHA512 3e1f4c51777d9168c7a9dccdbf0333ec23d702659673732ebe8106c852069f2b0133c7fb64e277e371afaee1a0d7a8918160e0483d9bc59340db2565838fe045 MISC metadata.xml 1635 BLAKE2B a18aec5797d25bf4440d2900663e87b2a2b8ce9b7a64584bd4bb827e3a678d2ce67853d745b1d660f7309ca9004301fdd6dc2f6e3ac73c54a45945027185075f SHA512 38ceed3b5f66d428ef804f9bfeca3174ee8c54825c926c7426f1484647ea9141c2cda276c190b78299f6d99831d6242e2132524bc86cc032b82b3accae3224b2 diff --git a/sys-cluster/ceph/ceph-12.2.4.ebuild b/sys-cluster/ceph/ceph-12.2.4-r1.ebuild index bc3dd0a718aa..1fbe80838494 100644 --- a/sys-cluster/ceph/ceph-12.2.4.ebuild +++ b/sys-cluster/ceph/ceph-12.2.4-r1.ebuild @@ -264,7 +264,7 @@ src_install() { fowners -R ceph:ceph /var/lib/ceph /var/log/ceph newinitd "${FILESDIR}/rbdmap.initd" rbdmap - newinitd "${FILESDIR}/${PN}.initd-r7" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} newconfd "${FILESDIR}/${PN}.confd-r4" ${PN} insinto /etc/sysctl.d diff --git a/sys-cluster/ceph/files/ceph.initd-r8 b/sys-cluster/ceph/files/ceph.initd-r8 new file mode 100644 index 000000000000..2f6c2601f168 --- /dev/null +++ b/sys-cluster/ceph/files/ceph.initd-r8 @@ -0,0 +1,95 @@ +#!/sbin/openrc-run + +ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}" +extra_commands="reload" +daemon_type="${RC_SVCNAME#ceph-}" +daemon_type="${daemon_type%%.*}" +daemon_id="${RC_SVCNAME#ceph-*.}" +daemon_id="${daemon_id:-0}" +: ${rundir:=/run/ceph} +: ${user:=ceph} +: ${group:=ceph} +: ${rc_ulimit:=-n 1048576 -u 1048576} + +pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid" +daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid" + +command="/usr/bin/${RC_SVCNAME%%.*}" +command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}" +command_args_foreground="--foreground" + +retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}" +start_stop_daemon_args="--user ${user} --group ${group}" +supervise_daemon_args="--user ${user} --group ${group}" + +: ${supervisor:=supervise-daemon} +: ${stdout:=/var/log/ceph/ceph} +: ${stderr:=/var/log/ceph/ceph} +: ${respawn_delay:=10} +: ${respawn_max:=5} +: ${respawn_period:=1800} + +: ${osd_respawn_delay:=15} +: ${osd_respawn_max:=10} + +: ${radosgw_respawn_max:=5} +: ${radosgw_respawn_period:=30} + +depend() { + use dns logger + after net ntpd ntp-client chronyd + before netmount +} + +is_type_valid() { + case ${daemon_type} in + mon|mds|osd|mgr|radosgw) return 0;; + *) return 1;; + esac +} + +start_pre() { + export CEPH_CONF="${ceph_conf}" + + checkpath -d -q -o "${user}:${group}" "${rundir}" + + if ! is_type_valid ;then + eerror "Please give valid Ceph Server Type: mds, mon, osd" + return 1 + + elif pgrep -f "[c]eph-${daemon_type} -i ${daemon_id} "; then + eerror "${daemon_type}.${daemon_id} is still running, refusing to start" + return 1 + fi + + local arg_name arg_val + for arg_name in std{out,err} respawn_{delay,max,period}; do + eval arg_val="\${${daemon_type}_${arg_name}}" + + if [ -z "${arg_val}" ]; then + eval arg_val="\${${arg_name}}" + else + eval "${arg_name}=\"${arg_val}\"" + fi + + if [ "${arg_name}" = "stderr" ] || [ "${arg_name}" = "stdout" ]; then + local log_file log_postfix + log_postfix=".${daemon_id}-${arg_name}.log" + log_file="${arg_val}" + + if [ "${log_file}" != /dev/null ] + log_file="${log_file}${log_postfix}" + fi + + supervise_daemon_args="${supervise_daemon_args} --${arg_name//_/-}=${log_file}" + fi + done +} + +reload() { + ebegin "Reloading Ceph ${daemon_type}.${daemon_id}" + start-stop-daemon --signal 1 "${start_stop_daemon_args}" + eend ${?} +} + +# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: |