Merge "[ceph-osd] Remove ceph-mon dependency in ceph-osd liveness probe"

This commit is contained in:
Zuul 2022-05-11 16:23:15 +00:00 committed by Gerrit Code Review
commit f4405d4f1b
3 changed files with 6 additions and 9 deletions
ceph-osd
Chart.yaml
templates/bin/osd
releasenotes/notes

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ceph OSD
name: ceph-osd
version: 0.1.40
version: 0.1.41
home: https://github.com/ceph/ceph
...

@ -25,17 +25,13 @@ cond=1
for sock in $SOCKDIR/$SBASE.*.$SSUFFIX; do
if [ -S $sock ]; then
OSD_ID=$(echo $sock | awk -F. '{print $2}')
OSD_STATE=$(ceph -f json-pretty --connect-timeout 1 --admin-daemon "${sock}" status|grep state|sed 's/.*://;s/[^a-z]//g')
NOUP_FLAG=$(ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring status | awk '/flags/{print $2}' | grep noup)
OSD_STATE=$(ceph -f json --connect-timeout 1 --admin-daemon "${sock}" status|jq -r '.state')
echo "OSD ${OSD_ID} ${OSD_STATE}";
# this might be a stricter check than we actually want. what are the
# other values for the "state" field?
if [ "x${OSD_STATE}x" = 'xactivex' ]; then
cond=0
elif [ "${NOUP_FLAG}" ] && [ "x${OSD_STATE}x" = 'xprebootx' ]; then
# Succeed if the OSD state is active (running) or preboot (starting)
if [ "${OSD_STATE}" = "active" ] || [ "${OSD_STATE}" = "preboot" ]; then
cond=0
else
# one's not ready, so the whole pod's not ready.
# Any other state is unexpected and the probe fails
exit 1
fi
else

@ -41,4 +41,5 @@ ceph-osd:
- 0.1.38 Skip pod wait in post-apply job when disruptive
- 0.1.39 Allow for unconditional OSD restart
- 0.1.40 Remove udev interactions from osd-init
- 0.1.41 Remove ceph-mon dependency in ceph-osd liveness probe
...