forked from mtusi2026/mtusi2026lab4
Evidence comes from the stand started from an empty state and from a fresh clone: the public smoke, the contract checks, lint and 325 own tests, the storage layout with an out-of-API comparison of a stored object against its metadata, failover of each replica under writes, the upload failover scenario, persistence with StartedAt of every service including S3, the S3 outage scenario and 22 S3 privacy and bootstrap checks. The storage evidence script now covers the attachment tables and the S3 secrets. REPORT.md follows the lab 4 template: launch from a clean clone, architecture with the source of truth for each fact, the write order between PostgreSQL and S3 and what each failure leaves behind, where each upload limit applies, roles and services, the .env.example mapping, grade 3 rows and the grade 3 failure table. The design notes the botocore Expect header that hung uploads behind the port proxy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
40 lines
3.2 KiB
Plaintext
40 lines
3.2 KiB
Plaintext
date: 2026-10-28T18:29:25Z commit: 24f9d61
|
|
== before: api replicas (hostname = X-Instance-Id), state, StartedAt, FinishedAt
|
|
196b3a876d81 running started=2026-10-28T18:28:29.324800505Z finished=2026-10-28T18:26:09.117691179Z
|
|
8bd1d38428d0 running started=2026-10-28T18:25:38.512082013Z finished=2026-10-28T18:25:25.52109609Z
|
|
$ 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:18084"
|
|
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
|
{"observed_instances_before": 2, "successful_writes": 129, "failed_attempts": 0, "first_recovery_seconds": 2.737}
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
== after: api replicas
|
|
196b3a876d81 exited started=2026-10-28T18:28:29.324800505Z finished=2026-10-28T18:29:28.219275009Z
|
|
8bd1d38428d0 running started=2026-10-28T18:25:38.512082013Z finished=2026-10-28T18:25:25.52109609Z
|
|
== stopped replica: 196b3a876d81; shutdown: signal, drain window with readiness 503, close, exit
|
|
{"event":"Handling signal: term","level":"info","ts":"2026-10-28T18:29:25.807319Z"}
|
|
{"event":"Draining for 2.0 s","level":"info","ts":"2026-10-28T18:29:25.850076Z"}
|
|
{"event":"Draining for 2.0 s","level":"info","ts":"2026-10-28T18:29:25.854947Z"}
|
|
{"method":"GET","route":"/health/ready","status":503,"request_id":"3ee651bebf50472d9f12e5496f2500d7","duration_ms":0.64,"event":"request.handled","level":"info","ts":"2026-10-28T18:29:25.990552Z"}
|
|
{"method":"GET","route":"/health/ready","status":503,"request_id":"5f3ad3b3bc0449869616a50c4c0f1960","duration_ms":1.764,"event":"request.handled","level":"info","ts":"2026-10-28T18:29:26.504373Z"}
|
|
{"method":"GET","route":"/health/ready","status":503,"request_id":"1466f11698c14a9892a8e9a5bd446597","duration_ms":0.3,"event":"request.handled","level":"info","ts":"2026-10-28T18:29:27.081651Z"}
|
|
{"event":"Shutting down","level":"info","ts":"2026-10-28T18:29:27.852426Z"}
|
|
{"event":"Shutting down","level":"info","ts":"2026-10-28T18:29:27.856950Z"}
|
|
{"event":"service.stopped","level":"info","ts":"2026-10-28T18:29:27.963846Z"}
|
|
{"event":"Finished server process [8]","level":"info","ts":"2026-10-28T18:29:27.964073Z"}
|
|
{"event":"service.stopped","level":"info","ts":"2026-10-28T18:29:27.964840Z"}
|
|
{"event":"Finished server process [7]","level":"info","ts":"2026-10-28T18:29:27.965086Z"}
|
|
{"event":"Worker (pid:7) was sent SIGTERM!","level":"info","ts":"2026-10-28T18:29:28.007750Z"}
|
|
{"event":"Worker (pid:8) was sent SIGTERM!","level":"info","ts":"2026-10-28T18:29:28.007877Z"}
|
|
{"event":"Shutting down: Master","level":"info","ts":"2026-10-28T18:29:28.116313Z"}
|
|
$ scripts/restore.sh
|
|
Container mtusi2026lab4-api-2 Running
|
|
Container mtusi2026lab4-api-1 Starting
|
|
Container mtusi2026lab4-api-1 Started
|
|
Container mtusi2026lab4-api-1 Waiting
|
|
Container mtusi2026lab4-api-2 Waiting
|
|
Container mtusi2026lab4-api-1 Healthy
|
|
Container mtusi2026lab4-api-2 Healthy
|
|
== after restore
|
|
196b3a876d81 running started=2026-10-28T18:29:41.187041709Z finished=2026-10-28T18:29:28.219275009Z
|
|
8bd1d38428d0 running started=2026-10-28T18:25:38.512082013Z finished=2026-10-28T18:25:25.52109609Z
|