From 33f491dbcf10e34978e48841d57157925898fa8b Mon Sep 17 00:00:00 2001 From: Seungkyu Ahn Date: Fri, 22 Jun 2018 08:14:30 +0000 Subject: [PATCH] Sometimes hostname can contain the '-' character. This PR solves hostname parsing errors in mon-check. Change-Id: I900c6827d0c40c181900fb49cc920c28c69f0daf --- ceph-mon/templates/bin/mon/_check.sh.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph-mon/templates/bin/mon/_check.sh.tpl b/ceph-mon/templates/bin/mon/_check.sh.tpl index 96d2990c72..e494540d9b 100755 --- a/ceph-mon/templates/bin/mon/_check.sh.tpl +++ b/ceph-mon/templates/bin/mon/_check.sh.tpl @@ -25,7 +25,7 @@ function heath_check () { SBASE=${CEPH_OSD_SOCKET_BASE:-ceph-mon} SSUFFIX=${CEPH_SOCKET_SUFFIX:-asok} - MON_ID=$(ps auwwx | grep ceph-mon | grep -v "$1" | grep -v grep | sed 's/.*-i\ *//;s/\ *-.*//'|awk '{print $1}') + MON_ID=$(ps auwwx | grep ceph-mon | grep -v "$1" | grep -v grep | sed 's/.*-i\ //;s/\ .*//'|awk '{print $1}') if [ -z "${MON_ID}" ]; then if [[ ${K8S_HOST_NETWORK} -eq 0 ]]; then