Project

General

Profile

Feature #14348 » ceph-9.2.0-systemd.diff

main patch part - Artemy Kapitula, 01/12/2016 09:10 PM

View differences:

ceph-9.2.0/systemd/ceph-mon@.service 2016-01-02 01:19:48.000000000 -0500
LimitNOFILE=1048576
LimitNPROC=1048576
EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
ExecStart=/usr/sbin/ceph-custom-daemon mon %i -f --setuser ceph --setgroup ceph
ExecReload=/bin/kill -HUP $MAINPID
[Install]
-- ceph-9.2.0/systemd/ceph-osd@.service.old 2016-01-02 01:33:19.631000000 -0500
++ ceph-9.2.0/systemd/ceph-osd@.service 2016-01-02 01:20:07.000000000 -0500
......
LimitNPROC=1048576
EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
ExecStart=/usr/sbin/ceph-custom-daemon osd %i -f --setuser ceph --setgroup ceph
ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --node %i --setuser ceph --setgroup ceph
ExecReload=/bin/kill -HUP $MAINPID
[Install]
-- ceph-9.2.0/systemd/ceph-mds@.service.old 2016-01-02 01:33:08.447000000 -0500
++ ceph-9.2.0/systemd/ceph-mds@.service 2016-01-02 01:19:26.000000000 -0500
......
LimitNPROC=1048576
EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
ExecStart=/usr/sbin/ceph-custom-daemon mds %i -f --setuser ceph --setgroup ceph
ExecReload=/bin/kill -HUP $MAINPID
[Install]
-- ceph-9.2.0/systemd/ceph-create-keys@.service.old 2016-01-02 01:33:26.561000000 -0500
++ ceph-9.2.0/systemd/ceph-create-keys@.service 2016-01-02 03:00:29.000000000 -0500
......
[Service]
EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/sbin/ceph-create-keys --cluster ${CLUSTER} --id %i
ExecStart=/usr/sbin/ceph-custom-daemon create-keys %i
-- ceph-9.2.0/src/Makefile.am.old 2016-01-02 03:11:29.343000000 -0500
++ ceph-9.2.0/src/Makefile.am 2016-01-02 03:12:07.934000000 -0500
......
EXTRA_DIST += \
unittest_bufferlist.sh
EXTRA_DIST += \
ceph-custom-daemon
# work around old versions of automake that don't define $docdir
# NOTE: this won't work on suse, where docdir is /usr/share/doc/packages/$package.
-- ceph-9.2.0/src/Makefile-server.am.old 2016-01-02 03:13:21.991000000 -0500
++ ceph-9.2.0/src/Makefile-server.am 2016-01-02 03:13:32.308000000 -0500
......
ceph_sbin_SCRIPTS = ceph-create-keys
......
ceph_sbin_SCRIPTS = ceph-create-keys ceph-custom-daemon
bin_SCRIPTS += \
ceph-run \
-- ceph-9.2.0/src/Makefile.in.old 2016-01-02 03:12:18.656000000 -0500
++ ceph-9.2.0/src/Makefile.in 2016-01-02 03:15:03.026000000 -0500
......
$(srcdir)/upstart/radosgw-all.conf \
$(srcdir)/upstart/radosgw-all-starter.conf \
$(srcdir)/upstart/rbdmap.conf ceph.in ceph-disk ceph-disk-udev \
ceph-create-keys ceph-rest-api ceph-crush-location \
ceph-create-keys ceph-custom-daemon ceph-rest-api ceph-crush-location \
mount.fuse.ceph rbd-replay-many rbdmap yasm-wrapper \
unittest_bufferlist.sh
CLEANFILES = $(BUILT_SOURCES) $(shell_scripts) ceph_ver.h \
......
@ENABLE_CEPHFS_JAVA_TRUE@@ENABLE_CLIENT_TRUE@@WITH_CEPHFS_TRUE@@WITH_RADOS_TRUE@libcephfs_jni_la_LIBADD = $(LIBCEPHFS) $(LIBCOMMON) $(EXTRALIBS)
@ENABLE_CEPHFS_JAVA_TRUE@@ENABLE_CLIENT_TRUE@@WITH_CEPHFS_TRUE@@WITH_RADOS_TRUE@libcephfs_jni_la_CPPFLAGS = $(JDK_CPPFLAGS) $(AM_CPPFLAGS)
@ENABLE_CEPHFS_JAVA_TRUE@@ENABLE_CLIENT_TRUE@@WITH_CEPHFS_TRUE@@WITH_RADOS_TRUE@libcephfs_jni_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0
@ENABLE_SERVER_TRUE@ceph_sbin_SCRIPTS = ceph-create-keys \
@ENABLE_SERVER_TRUE@ceph_sbin_SCRIPTS = ceph-create-keys ceph-custom-daemon \
@ENABLE_SERVER_TRUE@ $(am__append_237)
@ENABLE_SERVER_TRUE@mount_ceph_SOURCES = mount/mount.ceph.c
@ENABLE_SERVER_TRUE@mount_ceph_LDADD = $(LIBSECRET) $(LIBCOMMON)
-- /dev/null 2016-01-11 08:58:47.410000000 -0500
++ ceph-9.2.0/src/ceph-custom-daemon 2016-01-11 09:10:20.872000000 -0500
......
#!/bin/bash
#
# Wrapping script to call CEPH daemons with %clustername.%daemonid
# i.e. mycluster.mon1, joecluster.2 or maryclustername.mds3
usage() {
echo "Usage: ceph-custom-daemon <daemon> [<cluste>.]<id> [ <daemon-options> ]"
echo " <daemon> ::= mon | mds | osd | create-keys | radosgw"
exit 1
}
if [ "$1" != "mon" -a "$1" != "osd" -a "$1" != "mds" -a "$1" != "create-keys" -a "$1" != "radosgw" -o -z "$2" ] ; then
usage
exit 1
fi
case "$1" in
mon) binary=ceph-mon ;;
mds) binary=ceph-mds ;;
osd) binary=ceph-osd ;;
create-keys) binary=ceph-create-keys ;;
radosgw) binary=radosgw ;;
esac
if echo "$2" | grep -q "\." ; then
cluster=`echo $2 | cut -f 1 -d .`
objid=`echo $2 | cut -f 2 -d .`
else
cluster=ceph
objid="$2"
fi
shift 2
if [ "$binary" = "ceph-create-keys" ] ; then
[ -f /var/lib/ceph/bootstrap-mds/$cluster.keyring ] && exit 0
fi
exec $binary --cluster ${cluster} --id $objid $@
......
-- ceph-9.2.0/src/ceph-disk.old 2016-01-11 09:24:26.741000000 -0500
++ ceph-9.2.0/src/ceph-disk 2016-01-11 09:24:19.000000000 -0500
......
],
)
elif os.path.exists(os.path.join(path, 'systemd')):
command_check_call(
[
'systemctl',
'enable',
'ceph-osd@{osd_id}'.format(osd_id=osd_id),
],
)
#
# We don't need to enable because systemd will use ceph-osd@.service file
#
# command_check_call(
# [
# 'systemctl',
# 'enable',
# 'ceph-osd@{cluster}.{osd_id}'.format(cluster=cluster,osd_id=osd_id),
# ],
# )
#
command_check_call(
[
'systemctl',
'start',
'ceph-osd@{osd_id}'.format(osd_id=osd_id),
'ceph-osd@{cluster}.{osd_id}'.format(cluster=cluster,osd_id=osd_id),
],
)
else:
(2-2/2)