1 From 3763a20314ec2b80ec9d8525a1d3867b3c731266 Mon Sep 17 00:00:00 2001
2 From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
3 Date: Sat, 22 Feb 2020 04:48:04 -0800
4 Subject: [PATCH] ceph rebase on stx.3.0 and warrior
6 From 03340eaf0004e3cc8e3f8991ea96a46757d92830 Mon Sep 17 00:00:00 2001
7 From: Don Penney <don.penney@windriver.com>
8 Date: Sat, 26 Jan 2019 13:34:55 -0500
9 Subject: [PATCH] Add hooks for orderly shutdown on controller
11 Hook the ceph init script to add systemd overrides to define
12 an orderly shutdown for StarlingX controllers.
14 src/init-ceph.in | 32 ++++++++++++++++++++++++++++++++
15 1 file changed, 32 insertions(+)
17 diff --git a/src/init-ceph.in b/src/init-ceph.in
18 index 1843710..a31b900 100755
19 --- a/src/init-ceph.in
20 +++ b/src/init-ceph.in
21 @@ -434,6 +434,38 @@ for name in $what; do
25 + . /etc/platform/platform.conf
26 + if [ "${nodetype}" = "controller" ]; then
27 + # StarlingX: Hook the transient services launched by systemd-run
28 + # to allow for proper cleanup and orderly shutdown
30 + # Set nullglob so wildcards will return empty string if no match
33 + OSD_SERVICES=$(for svc in /run/systemd/system/ceph-osd*.service; do basename $svc; done | xargs echo)
34 + for d in /run/systemd/system/ceph-osd*.d; do
35 + cat <<EOF > $d/starlingx-overrides.conf
37 +Before=docker.service
38 +After=sm-shutdown.service
43 + for d in /run/systemd/system/ceph-mon*.d; do
44 + cat <<EOF > $d/starlingx-overrides.conf
46 +Before=docker.service
47 +After=sm-shutdown.service ${OSD_SERVICES}
54 + systemctl daemon-reload
57 [ -n "$post_start" ] && do_cmd "$post_start"
58 [ -n "$lockfile" ] && [ "$?" -eq 0 ] && touch $lockfile