Ceph: Update MGR check to allow use on hosts with fqdns defined

This PS updates the mgr check to allow use on hosts with fqdns
defined.

Change-Id: If1cb740e8093fbcafce846234c96db931409b436
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2018-10-22 11:59:58 -05:00 committed by Chris Wedgwood
parent eabf53253f
commit 1144ccbbb2
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ COMMAND="${@:-liveness}"
function heath_check () {
ASOK=$(ls /var/run/ceph/${CLUSTER}-mgr*)
MGR_NAME=$(basename ${ASOK} | sed -e 's/.asok//' | cut -d. -f2)
MGR_NAME=$(basename ${ASOK} | sed -e 's/.asok//' | cut -f 1 -d '.' --complement)
MGR_STATE=$(ceph --cluster ${CLUSTER} --connect-timeout 1 daemon mgr.${MGR_NAME} status|grep "osd_epoch")
if [ $? = 0 ]; then
exit 0