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 ()
{
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