Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-support / puppet / files / puppet-ceph / 0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch
1 From a364f37cacab78cdaad5ebd23ab24cf400a3fa40 Mon Sep 17 00:00:00 2001
2 From: Ovidiu Poncea <ovidiu.poncea@windriver.com>
3 Date: Thu, 20 Dec 2018 07:18:55 -0500
4 Subject: [PATCH] Add StarlingX specific restart command for Ceph monitors
5
6 Since we don't use systemd to manage Ceph and we have pmon monitoring we
7 have to make sure that:
8 1. Restarting is properly handled as "systemctl restart" will return error
9    and manifest will fail;
10 2. Pmon does not check ceph-mon status during restart. Otherwise we risk
11    getting into a race condition between the puppet restart and pmon
12    detecting that ceph is down and trying a restart.
13
14 Both are resolved when using /etc/init.d/ceph-init-wrapper restart
15
16 Signed-off-by: Ovidiu Poncea <Ovidiu.Poncea@windriver.com>
17 ---
18  manifests/mon.pp | 1 +
19  1 file changed, 1 insertion(+)
20
21 diff --git a/manifests/mon.pp b/manifests/mon.pp
22 index 17cb925..62d5059 100644
23 --- a/manifests/mon.pp
24 +++ b/manifests/mon.pp
25 @@ -106,6 +106,7 @@ define ceph::mon (
26          start    => "service ceph start mon.${id}",
27          stop     => "service ceph stop mon.${id}",
28          status   => "service ceph status mon.${id}",
29 +        restart  => "/etc/init.d/ceph-init-wrapper restart mon.${id}",
30          enable   => $mon_enable,
31        }
32      }
33 -- 
34 1.8.3.1
35