Merge pull request #19899 from smithfarm/wip-rip-rcceph

build/ops: rpm: rip out rcceph script

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2018-01-22 16:36:23 +08:00 committed by GitHub
commit f5e7a8da11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 67 deletions

View File

@ -35,6 +35,13 @@
equivalent to the built-in default behavior, so it has been replaced with an
example in the CRUSH documentation.
* The "rcceph" script (systemd/ceph in the source code tree, shipped as
/usr/sbin/rcceph in the ceph-base package for CentOS and SUSE) has been
dropped. This script was used to perform admin operations (start, stop,
restart, etc.) on all OSD and/or MON daemons running on a given machine.
This functionality is provided by the systemd target units (ceph-osd.target,
ceph-mon.target, etc.).
>= 12.2.2
---------

View File

@ -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

View File

@ -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