lab3: исправить rolling update, данные трека 1 (прогон 1), серии C и E

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 17:47:27 +03:00
co-authored by Claude Opus 5.5
parent fe4b4cf556
commit 0a3718134b
14 changed files with 257 additions and 36 deletions
+9 -4
View File
@@ -33,7 +33,7 @@ step "smoke"
$PY tests/smoke.py --base-url "$BASE" | tee evidence/smoke.txt
step "конкурентная идемпотентность"
$PY tests/idempotency_concurrent.py --base-url "$BASE" --output evidence/idempotency_concurrent.json | tail -1
$PY student-tests/idempotency_concurrent.py --base-url "$BASE" --output evidence/idempotency_concurrent.json | tail -1
step "публичный failover (2 прогона, между ними restore)"
for n in 1 2; do
@@ -51,13 +51,18 @@ step "persistence (restart всего стенда с volumes)"
cat evidence/persistence.txt
step "серия отказов каждой реплики под нагрузкой (уровень 4)"
$PY tests/failover_series.py --base-url "$BASE" --output evidence/failover_series.json | tail -1
$PY student-tests/failover_series.py --base-url "$BASE" --output evidence/failover_series.json | tail -1
step "rolling update под нагрузкой (уровень 4)"
$PY tests/load.py --base-url "$BASE" --duration 60 --concurrency 4 --output evidence/rolling_update_load.json > /dev/null &
# Образ собираем ДО нагрузки, чтобы в окно нагрузки попала именно замена реплик.
docker compose build -q api
{ echo "-- до:"; docker compose ps api --format '{{.Name}} {{.ID}} {{.Status}}'; } > evidence/rolling_update.txt
$PY tests/load.py --base-url "$BASE" --duration 90 --concurrency 4 --output evidence/rolling_update_load.json > /dev/null &
LOAD=$!
sleep 5
sh scripts/rolling-update.sh > evidence/rolling_update.txt 2>&1
start=$(date +%s)
sh scripts/rolling-update.sh >> evidence/rolling_update.txt 2>&1
echo "-- замена заняла $(( $(date +%s) - start )) s (внутри 90 s нагрузки)" >> evidence/rolling_update.txt
wait $LOAD
cat evidence/rolling_update.txt evidence/rolling_update_load.json