openstack-helm-infra/ceph-mon/templates/bin/mon/_stop.sh.tpl
Steve Wilkerson 25bc83b580 Ceph: Move Ceph charts to openstack-helm-infra
This continues the work of moving infrastructure related services
out of openstack-helm, by moving the ceph charts to openstack
helm infra instead.

Change-Id: I306ccd9d494f72a7946a7850f96d5c22f36eb8a0
2018-08-28 15:03:35 -05:00

15 lines
306 B
Smarty

#!/bin/bash
set -ex
NUMBER_OF_MONS=$(ceph mon stat | awk '$3 == "mons" {print $2}')
if [ "${NUMBER_OF_MONS}" -gt "1" ]; then
if [[ ${K8S_HOST_NETWORK} -eq 0 ]]; then
ceph mon remove "${POD_NAME}"
else
ceph mon remove "${NODE_NAME}"
fi
else
echo "we are the last mon, not removing"
fi