From a24afcdcd30a096ba239dca932ebac95fa7c0392 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Tue, 28 Nov 2017 16:48:20 +0100 Subject: [PATCH] build/ops: rpm: rip out rcceph script "rcceph" is a SysVinit-style command-line interface for stopping, starting, enabling, etc. all ceph-osd and ceph-mon systemd units on a machine, in one go. Since the same functionality is provided by ceph-{osd,mon}.target, the script is obsolete. It is also unmaintained. Judging from the absence of recent mentions of the script online, I guess it is no longer used. Leaving dead code in the tree can cause confusion, especially when the code is packaged and shipped to customers. Therefore I propose to rip it out. Signed-off-by: Nathan Cutler --- ceph.spec.in | 2 -- systemd/ceph | 65 ---------------------------------------------------- 2 files changed, 67 deletions(-) delete mode 100644 systemd/ceph diff --git a/ceph.spec.in b/ceph.spec.in index 33acdc4bb08..bbc873eb70f 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -896,7 +896,6 @@ install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} %endif install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf -install -m 0755 -D systemd/ceph %{buildroot}%{_sbindir}/rcceph install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset mkdir -p %{buildroot}%{_sbindir} install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph @@ -956,7 +955,6 @@ rm -rf %{buildroot} %{_libexecdir}/systemd/system-preset/50-ceph.preset %{_sbindir}/ceph-create-keys %{_sbindir}/ceph-disk -%{_sbindir}/rcceph %dir %{_libexecdir}/ceph %{_libexecdir}/ceph/ceph_common.sh %dir %{_libdir}/rados-classes diff --git a/systemd/ceph b/systemd/ceph deleted file mode 100644 index 746234b1736..00000000000 --- a/systemd/ceph +++ /dev/null @@ -1,65 +0,0 @@ -#! /usr/bin/env bash - -### BEGIN INIT INFO -# Provides: ceph ceph-mon ceph-osd -# Required-Start: $network $remote_fs -# Required-Stop: $network $remote_fs -# Should-Start: network-remotefs -# Should-Stop: network-remotefs -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Ceph is a distributed object, and block, storage platform -# Description: Ceph is a distributed object, block, and file storage platform -### END INIT INFO - -SYSTEMD_NO_WRAP=1 . /etc/rc.status -rc_reset - -action=$1 ; shift - -# default cluster name to "ceph" -cluster="ceph" - -# Shared variables by many actions -dir_mon="/var/lib/ceph/mon/" -dir_osd="/var/lib/ceph/osd/" -if test -d ${dir_mon} ; then - lmon=`ls ${dir_mon} | grep ${cluster}` -fi -if test -d ${dir_osd} ; then - losd=`ls ${dir_osd} | grep ${cluster}` -fi -prefix="${cluster}-" - -case $action in start | stop | status | enable | disable | mask | unmask | restart | is-active | is-failed | show | kill | reset-failed ) - n=0 - if test -n "${lmon}" ; then - for s in ${lmon#=${prefix}} ; do - systemctl "${action}" ceph-mon@${s#$prefix}.service - rc_check - ((++n)) - done - fi - if test -n "${losd}" ; then - for s in ${losd#=${prefix}} ; do - systemctl "${action}" ceph-osd@${s#$prefix}.service - rc_check - ((++n)) - done - fi - if test $n -gt 0 ; then - rc_status - else - rc_status -u - fi - systemctl "${action}" ceph.target - rc_check -;; -*) - echo "Invalid parameter : $action" - echo "Valid parameters : start | stop | status | enable | disable | mask | unmask | restart | is-active | is-failed | show | kill | reset-failed" -;; -esac - -rc_exit - -- 2.39.5