diff --git a/ceph-client/templates/bin/mgr/_check.sh.tpl b/ceph-client/templates/bin/mgr/_check.sh.tpl index 9faf61ede..fd2069ffc 100644 --- a/ceph-client/templates/bin/mgr/_check.sh.tpl +++ b/ceph-client/templates/bin/mgr/_check.sh.tpl @@ -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