From d7dd9cf6a4b9a24e6edf807c1695b533e18fab1a Mon Sep 17 00:00:00 2001 From: Ovidiu Poncea Date: Thu, 28 Mar 2019 16:55:14 +0000 Subject: [PATCH] ceph: mtc process management improvement These commits were lost accidentally when StarlingX code was migrated from stx-ceph (ceph jewel version) repository to stx-integ: * keep Ceph up when locking a 1 node configuration On 1 node configration we need ceph to be operational when node is locked otherwise sysinv will give errors when trying to configure it. Implements: containerization-2002844-CEPH-persistent-storage-backend-for-Kubernetes Story: 2002844 Task: 26877 * enable MTC management of Ceph proceses on worker nodes Worker nodes may now have a ceph monitor enabled, so remove checks preventing it and make sure that ceph.sh is present in /etc/system.d/worker/. Origin patch: https://github.com/starlingx-staging/stx-ceph/ commit/4fa893a39b4025957f9725d3f75ea502d081ea76 Depends-On: Ibe104b32f568bb59a02b84c255983323d5d14757 Change-Id: Ifd7e6876b853f5629195451a0c4af240d40ebee8 Signed-off-by: Ovidiu Poncea Signed-off-by: Daniel Badea --- ceph/ceph/files/ceph.sh | 42 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) mode change 100755 => 100644 ceph/ceph/files/ceph.sh diff --git a/ceph/ceph/files/ceph.sh b/ceph/ceph/files/ceph.sh old mode 100755 new mode 100644 index 926eb0559..e7e6ecd1f --- a/ceph/ceph/files/ceph.sh +++ b/ceph/ceph/files/ceph.sh @@ -22,40 +22,30 @@ logecho () start () { - if [[ "$nodetype" == "controller" ]] || [[ "$nodetype" == "storage" ]]; then - logecho "Starting ceph services..." - ${INITDIR}/ceph start >> ${LOGFILE} 2>&1 - RC=$? + logecho "Starting ceph services..." + ${INITDIR}/ceph start >> ${LOGFILE} 2>&1 + RC=$? - if [ ! -f ${CEPH_FILE} ]; then - touch ${CEPH_FILE} - fi - else - logecho "No ceph services on ${nodetype} node" - exit 0 + if [ ! -f ${CEPH_FILE} ]; then + touch ${CEPH_FILE} fi } stop () { - if [[ "$nodetype" == "controller" ]] || [[ "$nodetype" == "storage" ]]; then - if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" == "simplex" ]]; then - logecho "Ceph services will continue to run on node" - exit 0 - fi - - logecho "Stopping ceph services..." - - if [ -f ${CEPH_FILE} ]; then - rm -f ${CEPH_FILE} - fi - - ${INITDIR}/ceph stop >> ${LOGFILE} 2>&1 - RC=$? - else - logecho "No ceph services on ${nodetype} node" + if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" == "simplex" ]]; then + logecho "Ceph services will continue to run on node" exit 0 fi + + logecho "Stopping ceph services..." + + if [ -f ${CEPH_FILE} ]; then + rm -f ${CEPH_FILE} + fi + + ${INITDIR}/ceph stop >> ${LOGFILE} 2>&1 + RC=$? } RC=0