Исправить проблемы, найденные повторной проверкой из чистого clone

- Healthcheck S3 проверяет реальную запись (PUT во внутренний filer):
  после рестарта SeaweedFS запись готова на 10–20 с позже /healthz, и
  make test-failover сразу после make test-persistence падал с 503.
- Upload на старте реплики ждёт первой успешной проверки S3 до 5 с.
- stop-one.sh берёт реплики из docker compose ps, а не по имени проекта.
- s3_outage.py в конце ждёт восстановления S3; переключение
  FAULT_INJECTION выполняется с --no-deps.
- Перезаписаны evidence/, в REPORT.md добавлен раздел повторной проверки.
This commit is contained in:
2026-11-07 11:34:41 +03:00
parent ace2bbd413
commit 0341b4e674
26 changed files with 335 additions and 262 deletions
+6 -6
View File
@@ -1,16 +1,16 @@
# 2026-11-06T22:40:29Z API containers: mounts and temp upload dir after all tests
# 2026-11-07T08:32:11Z API containers: mounts and temp upload dir after all tests
## mtusi-lab4-api-1
Mounts: bind:/run/secrets/postgres_password bind:/run/secrets/s3_api_access_key bind:/run/secrets/s3_api_secret_key
Mounts: bind:/run/secrets/s3_api_secret_key bind:/run/secrets/postgres_password bind:/run/secrets/s3_api_access_key
ls -la /tmp/uploads:
total 12
drwxrwxrwt 1 root root 4096 Nov 6 22:34 .
drwxrwxrwt 1 root root 4096 Nov 6 22:34 ..
drwxrwxrwt 1 root root 4096 Nov 7 08:23 .
drwxrwxrwt 1 root root 4096 Nov 7 08:23 ..
files > 10 KB anywhere writable (excluding /proc,/sys,/usr,/run/secrets):
## mtusi-lab4-api-2
Mounts: bind:/run/secrets/postgres_password bind:/run/secrets/s3_api_access_key bind:/run/secrets/s3_api_secret_key
ls -la /tmp/uploads:
total 12
drwxrwxrwt 1 root root 4096 Nov 6 22:34 .
drwxrwxrwt 1 root root 4096 Nov 6 22:34 ..
drwxrwxrwt 1 root root 4096 Nov 7 08:23 .
drwxrwxrwt 1 root root 4096 Nov 7 08:23 ..
files > 10 KB anywhere writable (excluding /proc,/sys,/usr,/run/secrets):
## upload buffering: tempfile.TemporaryFile -> O_TMPFILE (no directory entry), deleted on close or process death
+33 -33
View File
@@ -1,69 +1,69 @@
{
"replicas": [
"3256158ccd6a",
"680f36c618ba"
"3c9bca5b2595",
"76cd26b71556"
],
"rounds": [
{
"uploaded_by": "3256158ccd6a",
"stopped": "3256158ccd6a",
"uploaded_by": "3c9bca5b2595",
"stopped": "3c9bca5b2595",
"downloads": [
{
"instance": "680f36c618ba",
"sha256_ok": true,
"ms": 8.1
},
{
"instance": "680f36c618ba",
"instance": "76cd26b71556",
"sha256_ok": true,
"ms": 8.0
},
{
"instance": "680f36c618ba",
"instance": "76cd26b71556",
"sha256_ok": true,
"ms": 7.3
"ms": 5.7
},
{
"instance": "680f36c618ba",
"instance": "76cd26b71556",
"sha256_ok": true,
"ms": 20.1
"ms": 6.9
},
{
"instance": "680f36c618ba",
"instance": "76cd26b71556",
"sha256_ok": true,
"ms": 7.0
"ms": 22.4
},
{
"instance": "76cd26b71556",
"sha256_ok": true,
"ms": 5.8
}
],
"pass": true
},
{
"uploaded_by": "680f36c618ba",
"stopped": "680f36c618ba",
"uploaded_by": "76cd26b71556",
"stopped": "76cd26b71556",
"downloads": [
{
"instance": "3256158ccd6a",
"instance": "3c9bca5b2595",
"sha256_ok": true,
"ms": 25.3
"ms": 8.8
},
{
"instance": "3256158ccd6a",
"instance": "3c9bca5b2595",
"sha256_ok": true,
"ms": 9.1
"ms": 5.5
},
{
"instance": "3256158ccd6a",
"sha256_ok": true,
"ms": 6.2
},
{
"instance": "3256158ccd6a",
"sha256_ok": true,
"ms": 6.2
},
{
"instance": "3256158ccd6a",
"instance": "3c9bca5b2595",
"sha256_ok": true,
"ms": 5.9
},
{
"instance": "3c9bca5b2595",
"sha256_ok": true,
"ms": 6.9
},
{
"instance": "3c9bca5b2595",
"sha256_ok": true,
"ms": 4.5
}
],
"pass": true
+2 -2
View File
@@ -1,4 +1,4 @@
{"uploaded_by": "3256158ccd6a", "stopped": "3256158ccd6a", "downloads": [{"instance": "680f36c618ba", "sha256_ok": true, "ms": 8.1}, {"instance": "680f36c618ba", "sha256_ok": true, "ms": 8.0}, {"instance": "680f36c618ba", "sha256_ok": true, "ms": 7.3}, {"instance": "680f36c618ba", "sha256_ok": true, "ms": 20.1}, {"instance": "680f36c618ba", "sha256_ok": true, "ms": 7.0}], "pass": true}
{"uploaded_by": "680f36c618ba", "stopped": "680f36c618ba", "downloads": [{"instance": "3256158ccd6a", "sha256_ok": true, "ms": 25.3}, {"instance": "3256158ccd6a", "sha256_ok": true, "ms": 9.1}, {"instance": "3256158ccd6a", "sha256_ok": true, "ms": 6.2}, {"instance": "3256158ccd6a", "sha256_ok": true, "ms": 6.2}, {"instance": "3256158ccd6a", "sha256_ok": true, "ms": 5.9}], "pass": true}
{"uploaded_by": "3c9bca5b2595", "stopped": "3c9bca5b2595", "downloads": [{"instance": "76cd26b71556", "sha256_ok": true, "ms": 8.0}, {"instance": "76cd26b71556", "sha256_ok": true, "ms": 5.7}, {"instance": "76cd26b71556", "sha256_ok": true, "ms": 6.9}, {"instance": "76cd26b71556", "sha256_ok": true, "ms": 22.4}, {"instance": "76cd26b71556", "sha256_ok": true, "ms": 5.8}], "pass": true}
{"uploaded_by": "76cd26b71556", "stopped": "76cd26b71556", "downloads": [{"instance": "3c9bca5b2595", "sha256_ok": true, "ms": 8.8}, {"instance": "3c9bca5b2595", "sha256_ok": true, "ms": 5.5}, {"instance": "3c9bca5b2595", "sha256_ok": true, "ms": 5.9}, {"instance": "3c9bca5b2595", "sha256_ok": true, "ms": 6.9}, {"instance": "3c9bca5b2595", "sha256_ok": true, "ms": 4.5}], "pass": true}
{"pass": true, "rounds": 2}
exit=0
+2 -2
View File
@@ -1,6 +1,6 @@
# 2026-11-06T22:31:43Z make check
# 2026-11-07T08:24:34Z make check
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
exit=0
# 2026-11-06T22:31:43Z docker compose config --quiet
# 2026-11-07T08:24:34Z docker compose config --quiet
exit=0
+62 -62
View File
@@ -3,205 +3,205 @@
"steps": [
{
"step": "baseline janitor dry-run",
"t": 1794004683.9,
"t": 1794040130.0,
"report": {
"dry_run": true,
"grace_seconds": 3600,
"rows_by_status": {
"pending": 15,
"ready": 348
"pending": 1,
"ready": 467
},
"objects_total": 349,
"objects_total": 465,
"abandoned_pending": 0,
"orphan_objects": 0,
"missing_objects": 2,
"missing_objects": 3,
"deleted_objects": 0,
"deleted_rows": 0,
"errors": 0,
"duration_ms": 96.7
"duration_ms": 100.5
}
},
{
"step": "control + victim uploaded (ready)",
"t": 1794004684.0,
"control": "d9a16769-9f6a-486f-87d5-9d72be773f4f",
"victim": "6560be97-8430-4212-b132-e8cc9f7002ec"
"t": 1794040130.0,
"control": "8ef93cb0-8d87-4bee-9c98-c0b3295e8b28",
"victim": "59255c3f-edc6-4e6f-861f-fc02a57e11e1"
},
{
"step": "db-fail-after-s3-put -> compensation",
"t": 1794004687.1,
"t": 1794040133.2,
"status": 503,
"report": {
"dry_run": true,
"grace_seconds": 3600,
"rows_by_status": {
"pending": 15,
"ready": 350
"pending": 1,
"ready": 469
},
"objects_total": 351,
"objects_total": 467,
"abandoned_pending": 0,
"orphan_objects": 0,
"missing_objects": 2,
"missing_objects": 3,
"deleted_objects": 0,
"deleted_rows": 0,
"errors": 0,
"duration_ms": 92.0
"duration_ms": 99.1
},
"leftover_pending": 0,
"leftover_objects": 0
},
{
"step": "crash-after-s3-put",
"t": 1794004687.1,
"t": 1794040133.2,
"client_saw": "Failure"
},
{
"step": "crash-after-s3-put",
"t": 1794004690.3,
"t": 1794040136.4,
"client_saw": "Failure"
},
{
"step": "crash-after-pending",
"t": 1794004699.0,
"t": 1794040145.1,
"client_saw": "Failure"
},
{
"step": "client aborted upload at 1 of 5 MiB",
"t": 1794004707.3,
"t": 1794040152.9,
"report": {
"dry_run": true,
"grace_seconds": 3600,
"rows_by_status": {
"pending": 18,
"ready": 350
"pending": 4,
"ready": 469
},
"objects_total": 353,
"objects_total": 469,
"abandoned_pending": 0,
"orphan_objects": 0,
"missing_objects": 2,
"missing_objects": 3,
"deleted_objects": 0,
"deleted_rows": 0,
"errors": 0,
"duration_ms": 91.8
"duration_ms": 24.9
}
},
{
"step": "pending rows left by crashes",
"t": 1794004707.5,
"t": 1794040153.1,
"pending": 3
},
{
"step": "orphan injected: pending row deleted, object kept",
"t": 1794004707.6,
"row": "cfc406da-7b0a-480d-821e-4fab78251770"
"t": 1794040153.2,
"row": "59726e36-b9bd-478c-8012-1d004f7cc7a5"
},
{
"step": "missing injected: victim object deleted in S3",
"t": 1794004708.3,
"t": 1794040153.9,
"download_status": 503
},
{
"step": "janitor grace=3600 (all fresh): dry-run",
"t": 1794004714.3,
"t": 1794040160.3,
"report": {
"dry_run": true,
"grace_seconds": 3600,
"rows_by_status": {
"pending": 17,
"ready": 350
"pending": 3,
"ready": 469
},
"objects_total": 352,
"objects_total": 468,
"abandoned_pending": 0,
"orphan_objects": 0,
"missing_objects": 3,
"missing_objects": 4,
"deleted_objects": 0,
"deleted_rows": 0,
"errors": 0,
"duration_ms": 105.7
"duration_ms": 104.3
}
},
{
"step": "janitor grace=3600 (all fresh): real run deletes nothing",
"t": 1794004714.3,
"t": 1794040160.3,
"report": {
"dry_run": false,
"grace_seconds": 3600,
"rows_by_status": {
"pending": 17,
"ready": 350
"pending": 3,
"ready": 469
},
"objects_total": 352,
"objects_total": 468,
"abandoned_pending": 0,
"orphan_objects": 0,
"missing_objects": 3,
"missing_objects": 4,
"deleted_objects": 0,
"deleted_rows": 0,
"errors": 0,
"duration_ms": 99.5
"duration_ms": 101.2
}
},
{
"step": "after grace: dry-run",
"t": 1794004739.4,
"t": 1794040185.3,
"report": {
"dry_run": true,
"grace_seconds": 20,
"rows_by_status": {
"pending": 17,
"ready": 350
"pending": 3,
"ready": 469
},
"objects_total": 352,
"abandoned_pending": 17,
"objects_total": 468,
"abandoned_pending": 3,
"orphan_objects": 1,
"missing_objects": 3,
"missing_objects": 4,
"deleted_objects": 0,
"deleted_rows": 0,
"errors": 0,
"duration_ms": 101.9
"duration_ms": 103.0
}
},
{
"step": "after grace: real run",
"t": 1794004742.5,
"t": 1794040188.5,
"report": {
"dry_run": false,
"grace_seconds": 20,
"rows_by_status": {
"pending": 17,
"ready": 350
"pending": 3,
"ready": 469
},
"objects_total": 348,
"abandoned_pending": 17,
"objects_total": 466,
"abandoned_pending": 3,
"orphan_objects": 1,
"missing_objects": 3,
"deleted_objects": 18,
"deleted_rows": 17,
"missing_objects": 4,
"deleted_objects": 4,
"deleted_rows": 3,
"errors": 0,
"duration_ms": 103.4
"duration_ms": 180.4
}
},
{
"step": "after grace: repeated run (idempotent)",
"t": 1794004746.0,
"t": 1794040191.2,
"report": {
"dry_run": false,
"grace_seconds": 20,
"rows_by_status": {
"ready": 350
"ready": 469
},
"objects_total": 347,
"objects_total": 465,
"abandoned_pending": 0,
"orphan_objects": 0,
"missing_objects": 3,
"missing_objects": 4,
"deleted_objects": 0,
"deleted_rows": 0,
"errors": 0,
"duration_ms": 99.5
"duration_ms": 99.3
}
},
{
"step": "control attachment still intact",
"t": 1794004746.1,
"t": 1794040191.4,
"sha256_ok": true,
"pending_left": 0
}
+16 -16
View File
@@ -1,17 +1,17 @@
{"step": "baseline janitor dry-run", "t": 1794004683.9, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 15, "ready": 348}, "objects_total": 349, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 2, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 96.7}}
{"step": "control + victim uploaded (ready)", "t": 1794004684.0, "control": "d9a16769-9f6a-486f-87d5-9d72be773f4f", "victim": "6560be97-8430-4212-b132-e8cc9f7002ec"}
{"step": "db-fail-after-s3-put -> compensation", "t": 1794004687.1, "status": 503, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 15, "ready": 350}, "objects_total": 351, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 2, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 92.0}, "leftover_pending": 0, "leftover_objects": 0}
{"step": "crash-after-s3-put", "t": 1794004687.1, "client_saw": "Failure"}
{"step": "crash-after-s3-put", "t": 1794004690.3, "client_saw": "Failure"}
{"step": "crash-after-pending", "t": 1794004699.0, "client_saw": "Failure"}
{"step": "client aborted upload at 1 of 5 MiB", "t": 1794004707.3, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 18, "ready": 350}, "objects_total": 353, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 2, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 91.8}}
{"step": "pending rows left by crashes", "t": 1794004707.5, "pending": 3}
{"step": "orphan injected: pending row deleted, object kept", "t": 1794004707.6, "row": "cfc406da-7b0a-480d-821e-4fab78251770"}
{"step": "missing injected: victim object deleted in S3", "t": 1794004708.3, "download_status": 503}
{"step": "janitor grace=3600 (all fresh): dry-run", "t": 1794004714.3, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 17, "ready": 350}, "objects_total": 352, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 3, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 105.7}}
{"step": "janitor grace=3600 (all fresh): real run deletes nothing", "t": 1794004714.3, "report": {"dry_run": false, "grace_seconds": 3600, "rows_by_status": {"pending": 17, "ready": 350}, "objects_total": 352, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 3, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 99.5}}
{"step": "after grace: dry-run", "t": 1794004739.4, "report": {"dry_run": true, "grace_seconds": 20, "rows_by_status": {"pending": 17, "ready": 350}, "objects_total": 352, "abandoned_pending": 17, "orphan_objects": 1, "missing_objects": 3, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 101.9}}
{"step": "after grace: real run", "t": 1794004742.5, "report": {"dry_run": false, "grace_seconds": 20, "rows_by_status": {"pending": 17, "ready": 350}, "objects_total": 348, "abandoned_pending": 17, "orphan_objects": 1, "missing_objects": 3, "deleted_objects": 18, "deleted_rows": 17, "errors": 0, "duration_ms": 103.4}}
{"step": "after grace: repeated run (idempotent)", "t": 1794004746.0, "report": {"dry_run": false, "grace_seconds": 20, "rows_by_status": {"ready": 350}, "objects_total": 347, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 3, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 99.5}}
{"step": "control attachment still intact", "t": 1794004746.1, "sha256_ok": true, "pending_left": 0}
{"step": "baseline janitor dry-run", "t": 1794040130.0, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 1, "ready": 467}, "objects_total": 465, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 3, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 100.5}}
{"step": "control + victim uploaded (ready)", "t": 1794040130.0, "control": "8ef93cb0-8d87-4bee-9c98-c0b3295e8b28", "victim": "59255c3f-edc6-4e6f-861f-fc02a57e11e1"}
{"step": "db-fail-after-s3-put -> compensation", "t": 1794040133.2, "status": 503, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 1, "ready": 469}, "objects_total": 467, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 3, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 99.1}, "leftover_pending": 0, "leftover_objects": 0}
{"step": "crash-after-s3-put", "t": 1794040133.2, "client_saw": "Failure"}
{"step": "crash-after-s3-put", "t": 1794040136.4, "client_saw": "Failure"}
{"step": "crash-after-pending", "t": 1794040145.1, "client_saw": "Failure"}
{"step": "client aborted upload at 1 of 5 MiB", "t": 1794040152.9, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 4, "ready": 469}, "objects_total": 469, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 3, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 24.9}}
{"step": "pending rows left by crashes", "t": 1794040153.1, "pending": 3}
{"step": "orphan injected: pending row deleted, object kept", "t": 1794040153.2, "row": "59726e36-b9bd-478c-8012-1d004f7cc7a5"}
{"step": "missing injected: victim object deleted in S3", "t": 1794040153.9, "download_status": 503}
{"step": "janitor grace=3600 (all fresh): dry-run", "t": 1794040160.3, "report": {"dry_run": true, "grace_seconds": 3600, "rows_by_status": {"pending": 3, "ready": 469}, "objects_total": 468, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 4, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 104.3}}
{"step": "janitor grace=3600 (all fresh): real run deletes nothing", "t": 1794040160.3, "report": {"dry_run": false, "grace_seconds": 3600, "rows_by_status": {"pending": 3, "ready": 469}, "objects_total": 468, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 4, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 101.2}}
{"step": "after grace: dry-run", "t": 1794040185.3, "report": {"dry_run": true, "grace_seconds": 20, "rows_by_status": {"pending": 3, "ready": 469}, "objects_total": 468, "abandoned_pending": 3, "orphan_objects": 1, "missing_objects": 4, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 103.0}}
{"step": "after grace: real run", "t": 1794040188.5, "report": {"dry_run": false, "grace_seconds": 20, "rows_by_status": {"pending": 3, "ready": 469}, "objects_total": 466, "abandoned_pending": 3, "orphan_objects": 1, "missing_objects": 4, "deleted_objects": 4, "deleted_rows": 3, "errors": 0, "duration_ms": 180.4}}
{"step": "after grace: repeated run (idempotent)", "t": 1794040191.2, "report": {"dry_run": false, "grace_seconds": 20, "rows_by_status": {"ready": 469}, "objects_total": 465, "abandoned_pending": 0, "orphan_objects": 0, "missing_objects": 4, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "duration_ms": 99.3}}
{"step": "control attachment still intact", "t": 1794040191.4, "sha256_ok": true, "pending_left": 0}
{"pass": true}
-16
View File
@@ -1,16 +0,0 @@
# 2026-11-06T22:36:28Z round 1 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:8080"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 128, "failed_attempts": 0, "first_recovery_seconds": 3.616}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
mtusi-lab4-api-1 Exited (0) 11 seconds ago
mtusi-lab4-api-2 Up About a minute (healthy)
# 2026-11-06T22:36:53Z round 2 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:8080"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 129, "failed_attempts": 0, "first_recovery_seconds": 3.514}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
mtusi-lab4-api-1 Exited (0) 11 seconds ago
mtusi-lab4-api-2 Up 2 minutes (healthy)
+2 -2
View File
@@ -7,8 +7,8 @@
"201": 160
},
"conflicting_body": {
"201": 80,
"409": 80
"409": 80,
"201": 80
}
},
"replicas_answered": 2,
+2 -2
View File
@@ -1,6 +1,6 @@
# 2026-11-06T22:33:44Z cursor_validation
# 2026-11-07T08:30:54Z cursor_validation
PASS: 6 cursor date boundary checks; invalid dates return 400.
# 2026-11-06T22:33:44Z idempotency_concurrency --rounds 10 --parallel 16
# 2026-11-07T08:30:55Z idempotency_concurrency --rounds 10 --parallel 16
"problems": []
}
PASS
+54
View File
@@ -0,0 +1,54 @@
# 2026-11-07T08:24:37Z round 1: make test-persistence ACTION_SCRIPT=scripts/restart.sh
## before
mtusi-lab4-api-1 StartedAt=2026-11-07T08:24:09.858075054Z
mtusi-lab4-api-2 StartedAt=2026-11-07T08:24:09.791252554Z
mtusi-lab4-db-1 StartedAt=2026-11-07T08:23:50.523803795Z
mtusi-lab4-janitor-1 StartedAt=2026-11-07T08:24:09.793362971Z
mtusi-lab4-lb-1 StartedAt=2026-11-07T08:24:09.948012971Z
mtusi-lab4-s3-1 StartedAt=2026-11-07T08:23:50.522934587Z
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## after
mtusi-lab4-api-1 StartedAt=2026-11-07T08:25:18.150425752Z
mtusi-lab4-api-2 StartedAt=2026-11-07T08:25:18.130956294Z
mtusi-lab4-db-1 StartedAt=2026-11-07T08:24:38.899196554Z
mtusi-lab4-janitor-1 StartedAt=2026-11-07T08:25:25.061171964Z
mtusi-lab4-lb-1 StartedAt=2026-11-07T08:25:15.229845459Z
mtusi-lab4-s3-1 StartedAt=2026-11-07T08:24:56.087874506Z
# 2026-11-07T08:25:25Z round 1: make test-failover ACTION_SCRIPT=scripts/stop-one.sh (сразу после persistence)
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 129, "failed_attempts": 0, "first_recovery_seconds": 3.723}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
mtusi-lab4-api-1 Up 22 seconds (healthy)
mtusi-lab4-api-2 Exited (0) 11 seconds ago
# 2026-11-07T08:25:50Z round 2: make test-persistence ACTION_SCRIPT=scripts/restart.sh
## before
mtusi-lab4-api-1 StartedAt=2026-11-07T08:25:18.150425752Z
mtusi-lab4-api-2 StartedAt=2026-11-07T08:25:41.189426555Z
mtusi-lab4-db-1 StartedAt=2026-11-07T08:24:38.899196554Z
mtusi-lab4-janitor-1 StartedAt=2026-11-07T08:25:25.061171964Z
mtusi-lab4-lb-1 StartedAt=2026-11-07T08:25:15.229845459Z
mtusi-lab4-s3-1 StartedAt=2026-11-07T08:24:56.087874506Z
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## after
mtusi-lab4-api-1 StartedAt=2026-11-07T08:26:31.35367805Z
mtusi-lab4-api-2 StartedAt=2026-11-07T08:26:31.310593342Z
mtusi-lab4-db-1 StartedAt=2026-11-07T08:25:51.588460754Z
mtusi-lab4-janitor-1 StartedAt=2026-11-07T08:26:37.94729322Z
mtusi-lab4-lb-1 StartedAt=2026-11-07T08:26:28.08777384Z
mtusi-lab4-s3-1 StartedAt=2026-11-07T08:26:09.003885512Z
# 2026-11-07T08:26:38Z round 2: make test-failover ACTION_SCRIPT=scripts/stop-one.sh (сразу после persistence)
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 128, "failed_attempts": 0, "first_recovery_seconds": 3.347}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
mtusi-lab4-api-1 Up 22 seconds (healthy)
mtusi-lab4-api-2 Exited (0) 11 seconds ago
-19
View File
@@ -1,19 +0,0 @@
# 2026-11-06T22:34:35Z make test-persistence ACTION_SCRIPT=scripts/restart.sh
## before
mtusi-lab4-api-1 StartedAt=2026-11-06T22:34:25.142761338Z
mtusi-lab4-api-2 StartedAt=2026-11-06T22:34:25.051958422Z
mtusi-lab4-db-1 StartedAt=2026-11-06T22:31:48.781439335Z
mtusi-lab4-janitor-1 StartedAt=2026-11-06T22:34:25.051487922Z
mtusi-lab4-lb-1 StartedAt=2026-11-06T22:34:25.25065088Z
mtusi-lab4-s3-1 StartedAt=2026-11-06T22:32:06.180453219Z
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## after
mtusi-lab4-api-1 StartedAt=2026-11-06T22:35:04.992242468Z
mtusi-lab4-api-2 StartedAt=2026-11-06T22:35:04.956369718Z
mtusi-lab4-db-1 StartedAt=2026-11-06T22:34:36.772295219Z
mtusi-lab4-janitor-1 StartedAt=2026-11-06T22:35:11.606706763Z
mtusi-lab4-lb-1 StartedAt=2026-11-06T22:35:01.752674342Z
mtusi-lab4-s3-1 StartedAt=2026-11-06T22:34:54.170338921Z
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-06T22:31:45Z s3-init run twice (idempotency)
# 2026-11-07T08:24:35Z s3-init run twice (idempotency)
{"bucket": "messenger-attachments", "created": false, "already_existed": true, "anonymous_http_status": {"anonymous_get_object": 403, "anonymous_list_bucket": 403}, "private": true}
exit=0
{"bucket": "messenger-attachments", "created": false, "already_existed": true, "anonymous_http_status": {"anonymous_get_object": 403, "anonymous_list_bucket": 403}, "private": true}
+23 -18
View File
@@ -6,19 +6,19 @@
"probe": {
"upload": {
"status": 201,
"ms": 8,
"ms": 6,
"code": null,
"retry_after": null
},
"download": {
"status": 200,
"ms": 4,
"ms": 3,
"code": null,
"retry_after": null
},
"text_message": {
"status": 201,
"ms": 5,
"ms": 3,
"code": null,
"retry_after": null
},
@@ -35,19 +35,19 @@
"probe": {
"upload": {
"status": 503,
"ms": 14,
"ms": 18,
"code": "unavailable",
"retry_after": "1"
},
"download": {
"status": 503,
"ms": 11,
"ms": 10,
"code": "unavailable",
"retry_after": "1"
},
"text_message": {
"status": 201,
"ms": 11,
"ms": 9,
"code": null,
"retry_after": null
},
@@ -64,25 +64,25 @@
"probe": {
"upload": {
"status": 503,
"ms": 15,
"ms": 14,
"code": "unavailable",
"retry_after": "1"
},
"download": {
"status": 503,
"ms": 10,
"ms": 11,
"code": "unavailable",
"retry_after": "1"
},
"text_message": {
"status": 201,
"ms": 8,
"ms": 12,
"code": null,
"retry_after": null
},
"ready": {
"status": 200,
"ms": 3,
"ms": 2,
"code": null,
"retry_after": null
}
@@ -90,32 +90,32 @@
},
{
"phase": "recovery after `start s3`",
"upload_201_after_s": 19.7
"upload_201_after_s": 20.1
},
{
"phase": "immediately after `pause s3` (S3Health not yet stale)",
"probe": {
"upload": {
"status": 503,
"ms": 10041,
"ms": 10032,
"code": "unavailable",
"retry_after": "1"
},
"download": {
"status": 503,
"ms": 12,
"ms": 11,
"code": "unavailable",
"retry_after": "1"
},
"text_message": {
"status": 201,
"ms": 10,
"ms": 15,
"code": null,
"retry_after": null
},
"ready": {
"status": 200,
"ms": 3,
"ms": 4,
"code": null,
"retry_after": null
}
@@ -126,19 +126,19 @@
"probe": {
"upload": {
"status": 503,
"ms": 15,
"ms": 13,
"code": "unavailable",
"retry_after": "1"
},
"download": {
"status": 503,
"ms": 10,
"ms": 9,
"code": "unavailable",
"retry_after": "1"
},
"text_message": {
"status": 201,
"ms": 12,
"ms": 14,
"code": null,
"retry_after": null
},
@@ -153,6 +153,11 @@
{
"phase": "recovery after `unpause s3`",
"upload_201_after_s": 0.0
},
{
"phase": "s3 healthcheck healthy again",
"after_s": 5.2,
"status": "healthy"
}
]
}
+7 -6
View File
@@ -1,8 +1,9 @@
{"phase": "baseline", "probe": {"upload": {"status": 201, "ms": 8, "code": null, "retry_after": null}, "download": {"status": 200, "ms": 4, "code": null, "retry_after": null}, "text_message": {"status": 201, "ms": 5, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 1, "code": null, "retry_after": null}}}
{"phase": "immediately after `stop s3` (S3Health not yet stale)", "probe": {"upload": {"status": 503, "ms": 14, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 11, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 11, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 3, "code": null, "retry_after": null}}}
{"phase": "S3 down for 5 s (`stop s3`)", "probe": {"upload": {"status": 503, "ms": 15, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 10, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 8, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 3, "code": null, "retry_after": null}}}
{"phase": "recovery after `start s3`", "upload_201_after_s": 19.7}
{"phase": "immediately after `pause s3` (S3Health not yet stale)", "probe": {"upload": {"status": 503, "ms": 10041, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 12, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 10, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 3, "code": null, "retry_after": null}}}
{"phase": "S3 down for 5 s (`pause s3`)", "probe": {"upload": {"status": 503, "ms": 15, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 10, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 12, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 3, "code": null, "retry_after": null}}}
{"phase": "baseline", "probe": {"upload": {"status": 201, "ms": 6, "code": null, "retry_after": null}, "download": {"status": 200, "ms": 3, "code": null, "retry_after": null}, "text_message": {"status": 201, "ms": 3, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 1, "code": null, "retry_after": null}}}
{"phase": "immediately after `stop s3` (S3Health not yet stale)", "probe": {"upload": {"status": 503, "ms": 18, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 10, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 9, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 3, "code": null, "retry_after": null}}}
{"phase": "S3 down for 5 s (`stop s3`)", "probe": {"upload": {"status": 503, "ms": 14, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 11, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 12, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 2, "code": null, "retry_after": null}}}
{"phase": "recovery after `start s3`", "upload_201_after_s": 20.1}
{"phase": "immediately after `pause s3` (S3Health not yet stale)", "probe": {"upload": {"status": 503, "ms": 10032, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 11, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 15, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 4, "code": null, "retry_after": null}}}
{"phase": "S3 down for 5 s (`pause s3`)", "probe": {"upload": {"status": 503, "ms": 13, "code": "unavailable", "retry_after": "1"}, "download": {"status": 503, "ms": 9, "code": "unavailable", "retry_after": "1"}, "text_message": {"status": 201, "ms": 14, "code": null, "retry_after": null}, "ready": {"status": 200, "ms": 3, "code": null, "retry_after": null}}}
{"phase": "recovery after `unpause s3`", "upload_201_after_s": 0.0}
{"phase": "s3 healthcheck healthy again", "after_s": 5.2, "status": "healthy"}
{"pass": true, "only_200_201_503": true}
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-06T22:31:46Z docker compose --profile tools run --rm s3-check
# 2026-11-07T08:24:37Z docker compose --profile tools run --rm s3-check
PASS api: PutObject в свой bucket expected=allowed got=allowed
PASS anonymous GET object expected=403 got=403
PASS anonymous ListBucket expected=403 got=403
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-06T22:36:27Z make test
# 2026-11-07T08:24:34Z make test
python3 tests/smoke.py --base-url "http://localhost:8080"
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
exit=0
+22 -22
View File
@@ -5,7 +5,7 @@
{
"type": "image/png",
"bytes": 10482871,
"sha256": "54d7a3b5e10ad013"
"sha256": "b71e4655e4cd99ff"
},
{
"type": "image/jpeg",
@@ -18,42 +18,42 @@
"201": 36
},
"megabytes_uploaded_ok": 318.2,
"wall_s": 5.4,
"wall_s": 5.2,
"latency_s_p50_max": [
1.55,
1.82
1.52,
1.81
],
"replicas": {
"da654745927f": {
"rss_mib": 53,
"f3ae32951e26": {
"rss_mib": 50,
"hwm_mib_after_warmup": 82,
"samples": 118,
"peak_rss_mib_sampled": 95.7,
"peak_anon_mib": 77.1,
"samples": 115,
"peak_rss_mib_sampled": 93.8,
"peak_anon_mib": 75.6,
"peak_file_cache_mib": 55.4,
"vmhwm_mib": 95,
"cgroup_memory_peak_mib": 134.6,
"vmhwm_mib": 93,
"cgroup_memory_peak_mib": 133.0,
"memory_limit_mib": 256,
"uploads_served": 18
},
"5bc0705ce7a1": {
"rss_mib": 50,
"0bab682c4d3c": {
"rss_mib": 53,
"hwm_mib_after_warmup": 82,
"samples": 119,
"peak_rss_mib_sampled": 99.0,
"peak_anon_mib": 80.5,
"peak_file_cache_mib": 55.4,
"vmhwm_mib": 99,
"cgroup_memory_peak_mib": 126.8,
"samples": 111,
"peak_rss_mib_sampled": 97.6,
"peak_anon_mib": 85.8,
"peak_file_cache_mib": 53.1,
"vmhwm_mib": 97,
"cgroup_memory_peak_mib": 139.4,
"memory_limit_mib": 256,
"uploads_served": 18
}
},
"s3": {
"rss_mib": 458,
"rss_mib": 439,
"oom_killed": "false",
"peak_rss_mib_sampled": 483.5,
"peak_anon_mib": 403.0,
"peak_rss_mib_sampled": 484.4,
"peak_anon_mib": 402.8,
"restarts": 0,
"oom_killed_after": "false",
"memory_limit_mib": 768
+20 -20
View File
@@ -5,7 +5,7 @@
{
"type": "image/png",
"bytes": 10482871,
"sha256": "d54d0141d8a2f357"
"sha256": "d6c6106d37335280"
},
{
"type": "image/jpeg",
@@ -18,42 +18,42 @@
"201": 60
},
"megabytes_uploaded_ok": 530.3,
"wall_s": 8.6,
"wall_s": 8.4,
"latency_s_p50_max": [
2.4,
3.08
2.23,
2.82
],
"replicas": {
"da654745927f": {
"rss_mib": 54,
"f3ae32951e26": {
"rss_mib": 53,
"hwm_mib_after_warmup": 82,
"samples": 158,
"peak_rss_mib_sampled": 97.5,
"peak_anon_mib": 79.1,
"samples": 159,
"peak_rss_mib_sampled": 91.9,
"peak_anon_mib": 73.5,
"peak_file_cache_mib": 70.7,
"vmhwm_mib": 98,
"cgroup_memory_peak_mib": 154.0,
"vmhwm_mib": 91,
"cgroup_memory_peak_mib": 145.4,
"memory_limit_mib": 256,
"uploads_served": 30
},
"5bc0705ce7a1": {
"0bab682c4d3c": {
"rss_mib": 50,
"hwm_mib_after_warmup": 82,
"samples": 174,
"peak_rss_mib_sampled": 102.1,
"peak_anon_mib": 83.6,
"samples": 170,
"peak_rss_mib_sampled": 94.5,
"peak_anon_mib": 75.9,
"peak_file_cache_mib": 75.4,
"vmhwm_mib": 102,
"cgroup_memory_peak_mib": 168.1,
"vmhwm_mib": 94,
"cgroup_memory_peak_mib": 159.2,
"memory_limit_mib": 256,
"uploads_served": 30
}
},
"s3": {
"rss_mib": 468,
"rss_mib": 463,
"oom_killed": "false",
"peak_rss_mib_sampled": 476.9,
"peak_anon_mib": 396.3,
"peak_rss_mib_sampled": 487.3,
"peak_anon_mib": 406.0,
"restarts": 0,
"oom_killed_after": "false",
"memory_limit_mib": 768