[Pkg-ceph-commits] [ceph] 04/08: Transition to upstream systemd configuration, dealing with switch from previous Debian specific systemd service files.

James Downing Page jamespage at moszumanska.debian.org
Tue Dec 8 12:04:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

jamespage pushed a commit to branch experimental
in repository ceph.

commit db806597d7d47bc302d4b00a40f7780591617ae6
Author: James Page <james.page at ubuntu.com>
Date:   Fri Dec 4 11:45:42 2015 +0000

    Transition to upstream systemd configuration, dealing with switch from previous Debian specific systemd service files.
---
 debian/lib-systemd/system/ceph-mds.service | 11 +++++------
 debian/lib-systemd/system/ceph-mon.service | 21 +++++++++++----------
 debian/rules                               |  4 ++++
 3 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/debian/lib-systemd/system/ceph-mds.service b/debian/lib-systemd/system/ceph-mds.service
index 90a9614..86ff057 100644
--- a/debian/lib-systemd/system/ceph-mds.service
+++ b/debian/lib-systemd/system/ceph-mds.service
@@ -3,15 +3,14 @@ Description=Ceph metadata server daemon (MDS)
 Documentation=man:ceph-mds
 After=network-online.target nss-lookup.target
 Wants=network-online.target nss-lookup.target
-PartOf=ceph.service
-#RequiresMountsFor=/var/lib/ceph/mds/ceph-%H
+PartOf=ceph.target
 
 [Service]
-Environment=CLUSTER=ceph
-Environment=CONFIG=/etc/ceph/ceph.conf
+LimitNOFILE=1048576
+LimitNPROC=1048576
 EnvironmentFile=-/etc/default/ceph
-ExecStart=/usr/bin/ceph-mds --id %H --foreground --cluster ${CLUSTER} -c ${CONFIG}
-#Restart=on-abnormal
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %H --setuser ceph --setgroup ceph
 
 [Install]
 WantedBy=multi-user.target
diff --git a/debian/lib-systemd/system/ceph-mon.service b/debian/lib-systemd/system/ceph-mon.service
index bc040d6..c413900 100644
--- a/debian/lib-systemd/system/ceph-mon.service
+++ b/debian/lib-systemd/system/ceph-mon.service
@@ -1,18 +1,19 @@
 [Unit]
-Description=Ceph cluster monitor daemon (MON)
+Description=Ceph cluster monitor daemon
 Documentation=man:ceph-mon
-After=network-online.target
-Wants=network-online.target
-Requires=ceph-create-keys.service
-Before=ceph-create-keys.service
-PartOf=ceph.service
+
+After=network-online.target local-fs.target ceph-create-keys@%H.service
+Wants=network-online.target local-fs.target ceph-create-keys@%H.service
+
+PartOf=ceph.target
 
 [Service]
-Environment=CLUSTER=ceph
-Environment=CONFIG=/etc/ceph/ceph.conf
+LimitNOFILE=1048576
+LimitNPROC=1048576
 EnvironmentFile=-/etc/default/ceph
-ExecStart=/usr/bin/ceph-mon --id %H --foreground --cluster ${CLUSTER} -c ${CONFIG}
-LimitNOFILE=16384
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %H --setuser ceph --setgroup ceph
+ExecReload=/bin/kill -HUP $MAINPID
 Restart=on-failure
 RestartSec=30
 
diff --git a/debian/rules b/debian/rules
index 7f7b840..44cbce3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -106,10 +106,14 @@ override_dh_installinit:
 	sed -i s./etc/sysconfig/./etc/default/.g debian/ceph/lib/systemd/system/ceph-create-keys at .service
 	sed -i s./etc/sysconfig/./etc/default/.g debian/ceph/lib/systemd/system/ceph-osd at .service
 	sed -i s./etc/sysconfig/./etc/default/.g debian/ceph/lib/systemd/system/ceph-disk at .service
+	# NOTE(jamespage): Install previous ceph-mon service from packaging for upgrades
+	install -m0644 debian/lib-systemd/system/ceph-mon.service debian/ceph/lib/systemd/system
 	# systemd:ceph-mds
 	install -d -m0755 debian/ceph-mds/lib/systemd/system
 	install -m0644 systemd/ceph-mds at .service debian/ceph-mds/lib/systemd/system
 	sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mds/lib/systemd/system/ceph-mds at .service
+	# NOTE(jamespage): Install previous ceph-mds service from packaging for upgrades
+	install -m0644 debian/lib-systemd/system/ceph-mds.service debian/ceph/lib/systemd/system
 	# systemd:radosgw
 	install -d -m0755 debian/radosgw/lib/systemd/system
 	install -m0644 systemd/ceph-radosgw at .service debian/radosgw/lib/systemd/system

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list