Merge "[ceph-mon] update stop script not to remove mons from monmap"

This commit is contained in:
Zuul 2020-03-10 15:21:12 +00:00 committed by Gerrit Code Review
commit e60437bc9d

View File

@ -3,12 +3,12 @@
set -ex set -ex
NUMBER_OF_MONS=$(ceph mon stat | awk '$3 == "mons" {print $2}') NUMBER_OF_MONS=$(ceph mon stat | awk '$3 == "mons" {print $2}')
if [ "${NUMBER_OF_MONS}" -gt "1" ]; then if [[ "${NUMBER_OF_MONS}" -gt "3" ]]; then
if [[ ${K8S_HOST_NETWORK} -eq 0 ]]; then if [[ ${K8S_HOST_NETWORK} -eq 0 ]]; then
ceph mon remove "${POD_NAME}" ceph mon remove "${POD_NAME}"
else else
ceph mon remove "${NODE_NAME}" ceph mon remove "${NODE_NAME}"
fi fi
else else
echo "we are the last mon, not removing" echo "doing nothing since we are running less than or equal to 3 mons"
fi fi