From 1144ccbbb2d7ac2a709eb8711f33e18ff2f3e1df Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Mon, 22 Oct 2018 11:59:58 -0500 Subject: [PATCH] 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 --- ceph-client/templates/bin/mgr/_check.sh.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph-client/templates/bin/mgr/_check.sh.tpl b/ceph-client/templates/bin/mgr/_check.sh.tpl index 9faf61ed..fd2069ff 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