Files
mtusi2026lab5/evidence/failover.txt
T
ArtyomandClaude Opus 5.5 a55bc716c4 Record level 3 evidence and fill in the report
Every grade 3 item of lab 5 is proven on a stand raised from empty
volumes at fe26938: the public smoke passes with 202 queued and a real
256x160 JPEG thumbnail; the suite runs its six grade 3 scenarios and
eight invariants green, including worker down with both API replicas,
the relay and the broker restarted while the job stays in the queue,
a redelivered finished job that changes nothing, an S3 outage that
recovers on attempt 2 and five transient failures that end in
retry_exhausted; the stand evidence shows the queued job with
delivery mode 2, the job id as message id and exactly the contract
fields, 409 before ready and a clean SIGTERM of the relay and the
worker; persistence restarts all eight services with their volumes,
failover keeps 134 writes without errors, and the lab 4 scenarios,
S3 checks, upload faults and container policy still pass.

The report describes the clean clone start, the processes and the
source of truth, what is stored at the moment of 202, the outbox and
relay, the claim, fencing and ack order of the worker, the retry
policy, the failure windows, the broker topology and permissions, the
roles table and the mapping of .env.example.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-29 01:31:07 +03:00

39 lines
3.0 KiB
Plaintext

date: 2026-10-28T22:22:11Z commit: fe26938
== before: api replicas (hostname = X-Instance-Id), state, StartedAt, FinishedAt
6f688eb249b1 running started=2026-10-28T22:22:05.423248042Z finished=2026-10-28T22:21:58.379410261Z
db66b246dcf8 running started=2026-10-28T22:22:05.372051334Z finished=2026-10-28T22:21:58.358450386Z
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:18085"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 134, "failed_attempts": 0, "first_recovery_seconds": 2.852}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
== after: api replicas
6f688eb249b1 running started=2026-10-28T22:22:05.423248042Z finished=2026-10-28T22:21:58.379410261Z
db66b246dcf8 exited started=2026-10-28T22:22:05.372051334Z finished=2026-10-28T22:22:15.636566713Z
== stopped replica: db66b246dcf8; shutdown: signal, drain window with readiness 503, close, exit
{"event":"Handling signal: term","level":"info","ts":"2026-10-28T22:22:13.137381Z"}
{"event":"Draining for 2.0 s","level":"info","ts":"2026-10-28T22:22:13.153115Z"}
{"event":"Draining for 2.0 s","level":"info","ts":"2026-10-28T22:22:13.199627Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"24da035dd1a4415c92593374018243cf","duration_ms":2.055,"event":"request.handled","level":"info","ts":"2026-10-28T22:22:13.995688Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"13aaefddf6b044158fbdafb4ebd4e8a8","duration_ms":0.714,"event":"request.handled","level":"info","ts":"2026-10-28T22:22:14.498227Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-28T22:22:15.159499Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-28T22:22:15.203678Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-28T22:22:15.265766Z"}
{"event":"Finished server process [7]","level":"info","ts":"2026-10-28T22:22:15.266054Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-28T22:22:15.310366Z"}
{"event":"Finished server process [8]","level":"info","ts":"2026-10-28T22:22:15.310673Z"}
{"event":"Worker (pid:7) was sent SIGTERM!","level":"info","ts":"2026-10-28T22:22:15.365320Z"}
{"event":"Worker (pid:8) was sent SIGTERM!","level":"info","ts":"2026-10-28T22:22:15.365493Z"}
{"event":"Shutting down: Master","level":"info","ts":"2026-10-28T22:22:15.467387Z"}
$ scripts/restore.sh
Container mtusi2026lab5-api-1 Running
Container mtusi2026lab5-api-2 Starting
Container mtusi2026lab5-api-2 Started
Container mtusi2026lab5-api-2 Waiting
Container mtusi2026lab5-api-1 Waiting
Container mtusi2026lab5-api-2 Healthy
Container mtusi2026lab5-api-1 Healthy
== after restore
6f688eb249b1 running started=2026-10-28T22:22:05.423248042Z finished=2026-10-28T22:21:58.379410261Z
db66b246dcf8 running started=2026-10-28T22:22:28.448846553Z finished=2026-10-28T22:22:15.636566713Z