[ceph-osd] Extend the ceph-osd post-apply job PG wait

In some cases, especially for disruptive OSD restarts on upgrade,
PGs can take longer than the allowed ~30 seconds to get into a
peering state. In these cases, the post-apply job fails prematurely
instead of allowing time for the OSDs and PGs to recover. This
change extends that timeout to ~10 minutes instead to allow the PGs
plenty of recovery time.

The only negative effect of this change is that a legitimate
failure where the PGs can't recover will take 10 minutes to fail
the post-apply job instead of 30 seconds.

Change-Id: I9c22bb692385dbb7bc2816233c83c7472e071dd4
This commit is contained in:
Stephen Taylor 2023-07-07 08:35:54 -06:00
parent 6b6ca9e26c
commit 8d6cc364b7
3 changed files with 4 additions and 3 deletions

View File

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

View File

@ -97,8 +97,8 @@ function wait_for_pgs () {
while [[ $pgs_ready -lt 3 ]]; do
pgs_state=$(ceph --cluster ${CLUSTER} pg ls -f json | jq -c "${query}")
if [[ $(jq -c '. | select(.state | contains("peering") | not)' <<< "${pgs_state}") ]]; then
if [[ $pgs_inactive -gt 10 ]]; then
# If inactive PGs aren't peering, fail
if [[ $pgs_inactive -gt 200 ]]; then
# If inactive PGs aren't peering after ~10 minutes, fail
echo "Failure, found inactive PGs that aren't peering"
exit 1
fi

View File

@ -45,4 +45,5 @@ ceph-osd:
- 0.1.42 Added OCI registry authentication
- 0.1.43 Update all Ceph images to Focal
- 0.1.44 Update Ceph to 17.2.6
- 0.1.45 Extend the ceph-osd post-apply job PG wait
...