Merge "ceph: mtc process management improvement"

This commit is contained in:
Zuul 2019-05-02 16:30:55 +00:00 committed by Gerrit Code Review
commit be3f650285

42
ceph/ceph/files/ceph.sh Executable file → Normal file
View File

@ -22,40 +22,30 @@ logecho ()
start () start ()
{ {
if [[ "$nodetype" == "controller" ]] || [[ "$nodetype" == "storage" ]]; then logecho "Starting ceph services..."
logecho "Starting ceph services..." ${INITDIR}/ceph start >> ${LOGFILE} 2>&1
${INITDIR}/ceph start >> ${LOGFILE} 2>&1 RC=$?
RC=$?
if [ ! -f ${CEPH_FILE} ]; then if [ ! -f ${CEPH_FILE} ]; then
touch ${CEPH_FILE} touch ${CEPH_FILE}
fi
else
logecho "No ceph services on ${nodetype} node"
exit 0
fi fi
} }
stop () stop ()
{ {
if [[ "$nodetype" == "controller" ]] || [[ "$nodetype" == "storage" ]]; then if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" == "simplex" ]]; then
if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" == "simplex" ]]; then logecho "Ceph services will continue to run on node"
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"
exit 0 exit 0
fi fi
logecho "Stopping ceph services..."
if [ -f ${CEPH_FILE} ]; then
rm -f ${CEPH_FILE}
fi
${INITDIR}/ceph stop >> ${LOGFILE} 2>&1
RC=$?
} }
RC=0 RC=0