openstack-helm/ceph/templates/bin/_check_mgr.sh.tpl
Huamin Chen 5cd3a087bf ceph-mgr: change liveness/readiness probes
Instead of relying on the dashboard availability
we check the ceph-mgr map

Signed-off-by: Alexandre Marangone <amarango@redhat.com>

Change-Id: I78d33a4b522ed085ed85a638b3784c2d07026e39
2018-01-09 19:28:03 +00:00

15 lines
248 B
Smarty

#!/bin/bash
set -ex
export LC_ALL=C
source variables_entrypoint.sh
IS_MGR_AVAIL=`ceph ${CLI_OPTS} mgr dump | python -c "import json, sys; print json.load(sys.stdin)['available']"`
if [ "${IS_MGR_AVAIL}" = True ]; then
exit 0
else
exit 1
fi