public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/, sys-cluster/ceph/files/
Date: Sat, 10 Mar 2018 19:16:25 +0000 (UTC)	[thread overview]
Message-ID: <1520709366.db6059b94c8ee62f5b35b9d3469fc9f04c5b570b.chutzpah@gentoo> (raw)

commit:     db6059b94c8ee62f5b35b9d3469fc9f04c5b570b
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 10 19:15:35 2018 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Sat Mar 10 19:16:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db6059b9

sys-cluster/ceph: Revision bump, fix init script with /dev/null #643412

Special cases /dev/null
Closes: https://bugs.gentoo.org/643412
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../{ceph-12.2.4.ebuild => ceph-12.2.4-r1.ebuild}  |  2 +-
 sys-cluster/ceph/files/ceph.initd-r8               | 95 ++++++++++++++++++++++
 2 files changed, 96 insertions(+), 1 deletion(-)

diff --git a/sys-cluster/ceph/ceph-12.2.4.ebuild b/sys-cluster/ceph/ceph-12.2.4-r1.ebuild
similarity index 99%
rename from sys-cluster/ceph/ceph-12.2.4.ebuild
rename to sys-cluster/ceph/ceph-12.2.4-r1.ebuild
index bc3dd0a718a..1fbe8083849 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 00000000000..2f6c2601f16
--- /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:


             reply	other threads:[~2018-03-10 19:16 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-10 19:16 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-01  9:32 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/, sys-cluster/ceph/files/ Patrick Lauer
2024-07-30  9:05 Patrick Lauer
2024-07-30  9:05 Patrick Lauer
2023-11-08  2:51 Patrick McLean
2023-09-12  2:24 Patrick McLean
2023-06-04  5:06 Sam James
2023-06-03  1:54 Sam James
2023-04-11 23:28 Patrick McLean
2023-03-17 18:07 Patrick McLean
2022-10-28 15:57 Sam James
2022-10-04 23:42 Patrick McLean
2022-08-24 17:07 Patrick McLean
2022-08-22 20:29 Patrick McLean
2022-07-07 18:32 Patrick McLean
2022-06-28  0:27 Patrick McLean
2022-05-17 18:03 Patrick McLean
2022-05-13 10:59 Michał Górny
2022-05-05 22:51 Patrick McLean
2022-05-04 23:17 Patrick McLean
2022-04-29  0:31 Patrick McLean
2021-10-29 20:49 Patrick McLean
2021-10-25 17:02 Patrick McLean
2021-10-25 17:02 Patrick McLean
2021-07-01  0:47 Patrick McLean
2020-12-01  2:35 Patrick McLean
2020-11-25  5:38 Patrick McLean
2020-11-19  7:29 Patrick McLean
2020-09-25  0:53 Patrick McLean
2020-09-16 23:52 Patrick McLean
2020-08-05  0:16 Patrick McLean
2020-06-24  0:51 Patrick McLean
2020-04-03  1:41 Patrick McLean
2019-12-11 22:40 Patrick McLean
2019-11-08 23:26 Patrick McLean
2019-09-17 22:56 Patrick McLean
2019-09-05  0:26 Patrick McLean
2019-07-19  3:20 Patrick McLean
2019-06-13  1:48 Patrick McLean
2019-04-29 22:57 Patrick McLean
2019-04-12  2:05 Patrick McLean
2019-03-29  2:23 Patrick McLean
2019-03-20 21:54 Patrick McLean
2019-03-20  1:12 Patrick McLean
2019-01-08  0:13 Patrick McLean
2018-11-29 23:57 Patrick McLean
2018-11-09  2:51 Patrick McLean
2018-03-06 19:39 Patrick McLean
2018-02-06 17:43 Patrick Lauer
2017-12-05 20:10 Patrick McLean
2017-10-06 21:07 Patrick McLean
2017-09-27 21:19 Patrick McLean
2017-09-07 23:40 Patrick McLean
2017-08-02 22:11 Patrick McLean
2017-08-02 21:04 Patrick McLean
2017-07-31 19:04 Patrick McLean
2017-07-27 21:33 Patrick McLean
2017-07-27 21:27 Patrick McLean
2017-04-12 20:44 Patrick McLean
2017-02-10  1:18 Patrick McLean
2016-10-11 21:57 Patrick McLean
2016-07-11  1:23 Yixun Lan
2016-06-30 23:53 Patrick McLean
2016-06-07  6:45 Yixun Lan
2016-05-12 21:05 Patrick McLean
2016-05-12 18:56 Patrick McLean
2015-12-21  7:47 Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520709366.db6059b94c8ee62f5b35b9d3469fc9f04c5b570b.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox