[Pkg-ceph-commits] [ceph] 02/06: systemd sleep handler, similar to one we already use with pm-utils.

Dmitry Smirnov onlyjob at moszumanska.debian.org
Wed Oct 29 03:34:29 UTC 2014


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

onlyjob pushed a commit to branch experimental
in repository ceph.

commit 943a5d9
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Wed Oct 29 00:00:21 2014

    systemd sleep handler, similar to one we already use with pm-utils.
    
     Sleep handler should stop Ceph services on suspend and start or resume.
     This is necessary because otherwise OSDs will die with "Suicide timeout"
     upon resume. Unlike pm-utils handler which restarts OSDs only, systemd
     handler restart all Ceph daemons.
     Ideas how to (re)start only OSDs using  `systemctl` are welcome...
---
 debian/ceph.install                  |  1 +
 debian/lib-systemd/system-sleep/ceph | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/debian/ceph.install b/debian/ceph.install
index c4b2a31..fa10704 100644
--- a/debian/ceph.install
+++ b/debian/ceph.install
@@ -1,4 +1,5 @@
 debian/etc/pm/sleep.d/*    /etc/pm/sleep.d/
+debian/lib-systemd/system-sleep/*    /lib/systemd/system-sleep/
 etc/bash_completion.d/ceph
 usr/bin/ceph-clsinfo
 usr/bin/ceph-debugpack
diff --git a/debian/lib-systemd/system-sleep/ceph b/debian/lib-systemd/system-sleep/ceph
new file mode 100755
index 0000000..cf62f83
--- /dev/null
+++ b/debian/lib-systemd/system-sleep/ceph
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#/lib/systemd/system-sleep/ceph
+
+case $1 in
+pre)
+    /bin/systemctl stop ceph
+;;
+post)
+    /bin/systemctl start ceph
+;;
+esac

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