[P16] RCA: Provision never ran — credential rotation broken from inception #118
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root Cause Analysis
Summary
Provision has NEVER successfully executed in any CI pipeline. It was added in pipeline #97 and has been
skippedin every pipeline since (#97–#123+). When we finally made it run, it caused a stack-wide outage because.envpasswords didn't match PostgreSQL.5 Whys
.envhas HKDF-derived passwords, but PostgreSQL roles still had original bootstrap passwords.provision_postgres()never ran.deploy, which depended on buildx, which was broken for 25+ pipelines.report-failurewas also skipped. No health checks.Compounding Factors
deploydoesgit reset --hard→ overwrites.envif provision wrote it firstdeploydoesdocker compose up -d→ restarts services with.envpasswords that don't match backends.envand actual backend stateStructural Fix: Two-Phase Rotation
Key insight: change the backend FIRST, then update .env, then restart services. Never restart services with passwords that haven't been applied to the backend yet.