Files
mtusi2026lab2/evidence/hooks.txt
T
ArtyomandClaude Opus 5.5 957eabdfc3 Record level 3 evidence and fill in the report
Save sanitized outputs from a stand started from a clean state: the
clean clone run, smoke through the balancer, the stack view with the
replica hostnames, ports, networks, limits and the balancer server
states, the probe with two replicas behind one token and the eight
way race on one key, a failover run for each replica with the
container left exited and its graceful shutdown log, the hook
negative cases and the balancer answer without replicas, the
persistence run with StartedAt of every container before and after,
schema, migration rerun, KDF prefix, ignore rules, own tests and the
lab 2 stack fault tests through the balancer, plus the environment.

The report covers the clean clone start, the architecture, the
X-Instance-Id and idempotency decisions, the balancer settings, the
role to service table, the mapping of .env.example to the real
variables, one evidence row per level 3 criterion and the carried
lab 2 minimum, and the failure table for level 3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:53:11 +03:00

34 lines
1.4 KiB
Plaintext

date: 2026-10-28T08:48:13Z commit: 0796e29
$ TARGET_INSTANCE_ID=<hostname реплики> scripts/stop-one.sh; echo exit=$? # seconds — длительность хука
target=302cfee8f673 exit=0 seconds=0.68
302cfee8f673 exited exit_code=0 oom=false
b582bd503bdd running exit_code=0 oom=false
$ scripts/restore.sh
exit=0
302cfee8f673 running
b582bd503bdd running
$ TARGET_INSTANCE_ID=no-such-replica scripts/stop-one.sh; echo exit=$?
no running api replica answers as no-such-replica
exit=3
$ docker compose ps --format '{{.Service}} {{.Name}} {{.Status}}' # ничего не остановлено
api mtusi2026lab3-api-1 Up 2 seconds (healthy)
api mtusi2026lab3-api-2 Up 13 seconds (healthy)
lb mtusi2026lab3-lb-1 Up About a minute (healthy)
postgres mtusi2026lab3-postgres-1 Up About a minute (healthy)
valkey mtusi2026lab3-valkey-1 Up About a minute (healthy)
$ scripts/stop-one.sh # без TARGET_INSTANCE_ID
scripts/stop-one.sh: line 3: TARGET_INSTANCE_ID: test provides target API instance alias
exit=1
$ docker compose stop api # обе реплики, LB остаётся
2
$ curl -i -H 'X-Request-Id: no-replica-1' http://localhost:18083/api/v1/users/me
HTTP/1.1 503 Service Unavailable
x-request-id: no-replica-1
content-length: 93
content-type: application/json
{"error":{"code":"unavailable","message":"No ready API replica","request_id":"no-replica-1"}}
$ make restore
exit=0
after restore: 200