summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2018-11-29 15:56:27 -0800
committerPatrick McLean <chutzpah@gentoo.org>2018-11-29 15:56:27 -0800
commitbbbd36a51a7a23e7d7d40e881e4d703a3a4ac25f (patch)
tree2fa28f37473cbcc41ad2548a8e8bcae140362f92 /sys-cluster/ceph/files
parentmedia-video/xine-ui: Drop 0.99.9 (diff)
downloadgentoo-bbbd36a51a7a23e7d7d40e881e4d703a3a4ac25f.tar.gz
gentoo-bbbd36a51a7a23e7d7d40e881e4d703a3a4ac25f.tar.bz2
gentoo-bbbd36a51a7a23e7d7d40e881e4d703a3a4ac25f.zip
sys-cluster/ceph: Version bump to 12.2.10
Also update init script for radosgw args (bug #670066) and bluefs mounting (bug #661912) Bug: https://bugs.gentoo.org/670066 Bug: https://bugs.gentoo.org/661912 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'sys-cluster/ceph/files')
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r515
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r10108
2 files changed, 123 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph.confd-r5 b/sys-cluster/ceph/files/ceph.confd-r5
new file mode 100644
index 000000000000..5d114392d164
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r5
@@ -0,0 +1,15 @@
+# Example
+
+# default ceph conf file
+#ceph_conf="/etc/ceph/ceph.conf"
+
+# Set RADOSGW_WANT_NAME_PARAM=y in order to make the init script add
+# a --name=client.${RC_SVCNAME} parameter to command_args for radosgw.*
+# service instances. This will make the service use a key by the name
+# of client.${RC_SVCNAME} instead of the default client.admin key.
+# A setting like this in the ceph config file can be used to customize
+# the rgw_data and keyring paths used by radosgw instances:
+# [client]
+# rgw_data = /var/lib/ceph/radosgw/$cluster-$id
+# keyring = /var/lib/ceph/radosgw/$cluster-$id/keyring
+RADOSGW_WANT_NAME_PARAM=n
diff --git a/sys-cluster/ceph/files/ceph.initd-r10 b/sys-cluster/ceph/files/ceph.initd-r10
new file mode 100644
index 000000000000..2f5150fc340e
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r10
@@ -0,0 +1,108 @@
+#!/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() {
+ local logdir
+ 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
+
+ if [ -n "${bluestore_osd_fsid}" ]; then
+ einfo "Mounting Bluestore"
+ ceph-volume lvm activate "${daemon_id}" "${bluestore_osd_fsid}" --no-systemd
+ fi
+
+ if [ ${daemon_type} = radosgw ] && [ ${RADOSGW_WANT_NAME_PARAM} = y ]; then
+ command_args="${command_args} --name client.${daemon_id}"
+ 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 ]; then
+ log_file="${log_file}${log_postfix}"
+ fi
+
+ log_dir="$(dirname "${log_file}")"
+ checkpath -m 0755 -o "${user}:${group}" -d "${log_dir}"
+
+ 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: