Files
mtusi2026lab6/evidence/operator-results.md
T
2026-11-20 17:52:56 +03:00

95 lines
4.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Результаты проверок 16 и 20 ноября 2026 года
Источник — вывод команд на стенде. Секреты и сессионные токены не сохранены.
## Состояние до проверок
`docker compose ps -a`: api1/api2 — Up 10 minutes (healthy), postgres и broker —
healthy; worker, lb, grafana, loki, tempo, prometheus, otel-collector, s3 — Up;
s3-init — Exited (0). Полный набор ролей запущен. После restart состояния не присланы.
## Smoke
```
make test
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
```
## Persistence
```
make test-persistence ACTION_SCRIPT=scripts/restart.sh
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
```
## Failover
```
make test-failover ACTION_SCRIPT=scripts/stop-one.sh
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 54, "failed_attempts": 4, "first_recovery_seconds": 2.696}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
```
## Нагрузка
Команда: `python3 tests/load.py --duration 30 --concurrency 4 --output evidence/load.json`.
Результаты нагрузки из `evidence/load.json` приведены ниже.
12773 успеха, 0 ошибок, 424.445 RPS; p50/p95/p99 = 8.683/12.634/23.901 мс.
## Повторяемый failover — дополнительный запуск
```text
make test-failover-repeatable
Both API replicas are ready through the load balancer
{"observed_instances_before": 2, "successful_writes": 72, "failed_attempts": 3, "first_recovery_seconds": 2.355}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
```
В заключительном выводе Docker api1 имеет статус Started; обёртка запускает обе
реплики после завершения теста.
## Скриншоты Grafana
В REPORT.md описаны наблюдения по семи скриншотам Grafana: два вида
дашборда, лог и трасса API, поиск логов worker, лог обработки и трасса загрузки.
API trace ID: 0bfcaa8384a34151aee4ae0d4387441d.
Upload/worker trace ID: 0dc6e36ad05603919332b5957929c909.
Job outcome=success, attempt=1, duration=28.63 мс; в upload trace семь spans.
Графики p95 имеют грубые histogram buckets, их значения не трактуются как точные percentile.
## Повторная проверка failover 20.11.2026
Интервал — 17:41:06–17:41:32 МСК. Команда `make test-failover-repeatable`.
```text
Both API replicas are ready through the load balancer
{"observed_instances_before": 2, "successful_writes": 54, "failed_attempts": 4, "first_recovery_seconds": 2.355}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
```
После теста сценарий запустил `api1`. При проверке `docker compose ps api1 api2`
реплика `api1` имела статус health: starting, а `api2` — healthy.
В Loki в 17:41:28.589 МСК зафиксировано создание сообщения через `api2`
с HTTP 201 за 10,35 мс. Trace ID — `82a1d11fa18230512035ebcd76cb3a35`.
## Проверка остановки worker 20.11.2026
Интервал — 17:31:25–17:31:37 МСК. Команда `python3 scripts/test-worker-outage.py`.
```text
worker stopped, attachment queued, trace_id=dc807159c626aaf72c9ae58641117383
PASS: attachment ready, original verified, trace_id=dc807159c626aaf72c9ae58641117383
```
События `http.request` и `job.completed` найдены в Loki, семь spans той же
операции — в Tempo. Измерения приведены в REPORT.md.
## Доказательство перезапуска PostgreSQL
Тест сохранности завершился с PASS. Значения `StartedAt` контейнера PostgreSQL
до и после запуска hook пока не зафиксированы.