65 lines
3.0 KiB
Markdown
65 lines
3.0 KiB
Markdown
# Reviewed recovery exercises
|
|
|
|
V1 and v2 have now completed Jenkins releases 5 and 6 with real human approvals.
|
|
The four exact successful records in `../releases/` need review/commit before
|
|
recovery. Do not use the earlier 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 remain unexecuted. No failure configuration is deployed merely
|
|
by merging this PR: its net template is unchanged and the bad SHA is selected
|
|
only in the explicit staging exercise.
|