Roll out shutdown tuning across the barman-backed CNPG clusters:
- stopDelay: 60 (all three) — caps terminationGracePeriodSeconds. With the
barman-cloud plugin the demoted/restarting pod's instance-manager deadlocks
on shutdown: a plugin runnable misses the 30s controller-runtime grace, the
process never exits, and the native sidecar (which only stops after the main
container) keeps running -> pod hangs Terminating (upstream
cloudnative-pg#9770). Default 1800s leaves 2-instance clusters at 1/2 (and
single-instance im-pg fully down) for ~30min after each failover/restart;
60s caps that to ~1min. Postgres itself is cleanly down by ~12s, so the
trimmed time is only the wedged instance-manager shell.
- smartShutdownTimeout: 10 (pprl-pg, im-pg) — already on ak-pg (#16); caps the
smart-shutdown drain so -rw isn't backendless for 180s. Validated on ak-pg:
app downtime 162s -> ~10s.
Note: changing stopDelay alters terminationGracePeriodSeconds, so CNPG rolls
each cluster's pods once to apply it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>