69 lines
3.3 KiB
Markdown
69 lines
3.3 KiB
Markdown
# Reviewed recovery exercises
|
||
|
||
V1 and v2 have now completed Jenkins releases 5 and 6 with real human approvals.
|
||
The four successful records in `../releases/` were reviewed in PR 27.
|
||
Builds 8–10 completed both exercises; see [results](../evidence/recovery-20261115.md).
|
||
The commands below remain the reproducible procedure, not a request to repeat
|
||
the completed fault. Do not use failed attempts' records.
|
||
|
||
The patch here is a deliberate **staging-only** configuration fault: Gunicorn
|
||
binds to 8001 while the unchanged image healthcheck probes 8000. It changes no
|
||
image, host port, credential, shared service, production command or stored data.
|
||
The reviewed Jenkins `staging-failure` mode requires a staging record and uses
|
||
that record's existing v2 digest; it does not publish/rebuild an image.
|
||
|
||
## Commit and review sequence
|
||
|
||
1. Commit the actual release records, evidence, monitoring helper, manual and
|
||
this patch while the active template remains correct.
|
||
2. Apply this patch and commit the one changed template as
|
||
`Exercise staging-only Gunicorn bind mismatch`.
|
||
3. Immediately revert that second commit, creating a third commit. The final
|
||
branch/main template must be good; the bad configuration survives only as
|
||
a reviewed historical commit selected explicitly by SHA for the exercise.
|
||
4. Billy reviews all three commits, including the intermediate configuration
|
||
fault and its restoration. Use a merge commit, preserving history.
|
||
|
||
After the first commit, the two configuration commits can be made with:
|
||
|
||
```powershell
|
||
git apply delivery/exercises/staging-bind-mismatch.patch
|
||
git add delivery/ansible/templates/compose.yaml.j2
|
||
git commit -m "Exercise staging-only Gunicorn bind mismatch"
|
||
git revert --no-edit HEAD
|
||
```
|
||
|
||
## Execution after review/merge
|
||
|
||
First record the planned healthy production rollback decision and start the
|
||
HTTPS observer. Use `MODE=rollback-production` and
|
||
`RELEASE_RECORD=delivery/releases/v1-production.json`. The approved operation
|
||
must restore v1's exact image/configuration, source SHA and total 30. This is
|
||
an exercise on healthy v2, not a claimed production incident. A real human
|
||
must approve the Jenkins production input.
|
||
|
||
Then start a separate staging observer and select:
|
||
|
||
```text
|
||
MODE=staging-failure
|
||
RELEASE_RECORD=delivery/releases/v2-staging.json
|
||
STAGING_FAILURE_CONFIG=<full SHA of the reviewed bind-mismatch commit>
|
||
```
|
||
|
||
The SHA must be the actual preserved intermediate commit, not the final
|
||
revert or an invented placeholder. Leave SOURCE_COMMIT blank so the job uses
|
||
reviewed current main for its control code. Compose wait must block within
|
||
its 90-second bound and stop before production. Preserve that failure.
|
||
|
||
Recover with `MODE=recover-staging` and the same good v2 staging record, leaving
|
||
STAGING_FAILURE_CONFIG blank. It must restore the recorded good configuration,
|
||
verify source/version/total 36, and pass the unchanged rerun with changed=0.
|
||
Save decision/start/completion times, recaps, observer samples and monitoring
|
||
correlation. Samples cannot establish zero interruption between requests.
|
||
|
||
Both exercises are complete. The actual fault SHA is
|
||
`1e23001e7303d14630cfa97c8de36f31f30b81a0`, immediately reverted by
|
||
`29e580c4613f00a02f44bce0dbcee2fd8fdc83ae`. Main and live staging are good;
|
||
the fault is selected only by the explicit staging exercise. Production remains
|
||
v1 after its successful rollback.
|