702 lines
29 KiB
Plaintext
702 lines
29 KiB
Plaintext
date: 2026-11-06T09:41:11Z commit: 2903d9dc73171d988ed0a1118b42ba8e13eaa088 project: hlpipe-lab6-clean-20261106094111
|
|
HTTP=18086 stats=26085
|
|
$ git clone --quiet --no-hardlinks /Users/artemkostylev/projects/learning/HL/labs/mtusi2026lab6 /Users/artemkostylev/projects/learning/HL/labs/mtusi2026lab6/.verification/hlpipe-lab6-clean-20261106094111
|
|
$ git checkout --quiet --detach 2903d9dc73171d988ed0a1118b42ba8e13eaa088
|
|
$ make secrets
|
|
sh scripts/secrets.sh
|
|
создан secrets/postgres_password
|
|
создан secrets/database_url
|
|
создан secrets/cursor_secret
|
|
создан secrets/valkey_password
|
|
создан secrets/valkey.conf
|
|
создан secrets/cache_url
|
|
создан secrets/s3_root_user
|
|
создан secrets/s3_root_password
|
|
создан secrets/s3_access_key_id
|
|
создан secrets/s3_secret_access_key
|
|
создан secrets/s3_reconciler_access_key_id
|
|
создан secrets/s3_reconciler_secret_access_key
|
|
создан .env из .env.example
|
|
sh scripts/broker-secrets.sh
|
|
broker and S3 worker secrets ready in secrets/ (values not printed)
|
|
sh scripts/secrets-lab6.sh
|
|
secrets/grafana_admin_password is ready (value not printed)
|
|
$ docker compose --env-file .env config --quiet
|
|
$ make up
|
|
sh scripts/secrets.sh
|
|
sh scripts/broker-secrets.sh
|
|
broker and S3 worker secrets ready in secrets/ (values not printed)
|
|
sh scripts/secrets-lab6.sh
|
|
secrets/grafana_admin_password is ready (value not printed)
|
|
docker compose build
|
|
#1 [internal] load local bake definitions
|
|
#1 reading from stdin 545B done
|
|
#1 DONE 0.0s
|
|
|
|
#2 [internal] load build definition from Dockerfile
|
|
#2 transferring dockerfile: 1.65kB done
|
|
#2 DONE 0.0s
|
|
|
|
#3 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
|
|
#3 DONE 0.0s
|
|
|
|
#4 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
|
|
#4 DONE 2.0s
|
|
|
|
#5 [internal] load .dockerignore
|
|
#5 transferring context: 453B done
|
|
#5 DONE 0.0s
|
|
|
|
#6 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
|
|
#6 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d 0.0s done
|
|
#6 DONE 0.0s
|
|
|
|
#7 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
|
|
#7 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 0.0s done
|
|
#7 DONE 0.0s
|
|
|
|
#8 [internal] load build context
|
|
#8 transferring context: 605.69kB 0.0s done
|
|
#8 DONE 0.0s
|
|
|
|
#9 [builder 3/7] WORKDIR /build
|
|
#9 CACHED
|
|
|
|
#10 [builder 4/7] COPY pyproject.toml uv.lock README.md ./
|
|
#10 CACHED
|
|
|
|
#11 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
|
|
#11 CACHED
|
|
|
|
#12 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable
|
|
#12 CACHED
|
|
|
|
#13 [builder 6/7] COPY src ./src
|
|
#13 DONE 0.0s
|
|
|
|
#14 [builder 7/7] RUN uv sync --locked --no-dev --no-editable
|
|
#14 0.140 Resolved 100 packages in 0.45ms
|
|
#14 0.142 Building mtusi-messenger @ file:///build
|
|
#14 2.014 Built mtusi-messenger @ file:///build
|
|
#14 2.018 Prepared 1 package in 1.87s
|
|
#14 2.022 Installed 1 package in 3ms
|
|
#14 2.133 Bytecode compiled 2802 files in 110ms
|
|
#14 2.133 + mtusi-messenger==1.6.0 (from file:///build)
|
|
#14 DONE 2.2s
|
|
|
|
#15 [runtime 2/6] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
|
|
#15 CACHED
|
|
|
|
#16 [runtime 3/6] COPY --from=builder --chown=root:root /opt/venv /opt/venv
|
|
#16 DONE 0.5s
|
|
|
|
#17 [runtime 4/6] WORKDIR /app
|
|
#17 DONE 0.0s
|
|
|
|
#18 [runtime 5/6] COPY --chown=root:root alembic.ini ./
|
|
#18 DONE 0.0s
|
|
|
|
#19 [runtime 6/6] COPY --chown=root:root alembic ./alembic
|
|
#19 DONE 0.0s
|
|
|
|
#20 exporting to image
|
|
#20 exporting layers
|
|
#20 exporting layers 3.0s done
|
|
#20 exporting manifest sha256:e6eecc6e471ef54fae2e845bf4c7872567a514ba260b96e65bfc6ebb7868c7ff
|
|
#20 exporting manifest sha256:e6eecc6e471ef54fae2e845bf4c7872567a514ba260b96e65bfc6ebb7868c7ff 0.0s done
|
|
#20 exporting config sha256:809d4de7fd1083c389167c8b5964152777e67c008a3432ca9a7fb77adca5ae62 done
|
|
#20 exporting attestation manifest sha256:480e3265c87cd9a0025891327b1a265819175c3eb71e6fe75caa02c5d386059e done
|
|
#20 exporting manifest list sha256:ef4761263d3a88c52b6cfeaa5f75e15c3f0f2c12561c05d0e45ec083f4565606 done
|
|
#20 naming to docker.io/library/mtusi-messenger:hlpipe-lab6-clean-20261106094111 done
|
|
#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab6-clean-20261106094111
|
|
#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab6-clean-20261106094111 0.7s done
|
|
#20 DONE 3.8s
|
|
|
|
#21 resolving provenance for metadata file
|
|
#21 DONE 0.0s
|
|
api Built
|
|
docker compose up -d --wait
|
|
Network hlpipe-lab6-clean-20261106094111_backend Creating
|
|
Network hlpipe-lab6-clean-20261106094111_backend Created
|
|
Network hlpipe-lab6-clean-20261106094111_edge Creating
|
|
Network hlpipe-lab6-clean-20261106094111_edge Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_healthtools" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_healthtools" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_broker-data" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_broker-data" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_valkeydata" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_valkeydata" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_grafana-data" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_grafana-data" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_prometheus-data" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_prometheus-data" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_pgdata" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_pgdata" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_s3data" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_s3data" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_tempo-data" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_tempo-data" Created
|
|
Volume "hlpipe-lab6-clean-20261106094111_loki-data" Creating
|
|
Volume "hlpipe-lab6-clean-20261106094111_loki-data" Created
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Creating
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Created
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Created
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Started
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Started
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Exited
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Healthy
|
|
scripts/lb-wait.sh
|
|
$ docker compose ps -a --format {{.Service}} {{.State}} {{.Status}} {{.Ports}}
|
|
api running Up 13 seconds (healthy)
|
|
api running Up 13 seconds (healthy)
|
|
broker running Up 20 seconds (healthy) 127.0.0.1:26086->15672/tcp
|
|
grafana running Up 19 seconds (healthy) 127.0.0.1:26300->3000/tcp
|
|
healthtools exited Exited (0) 20 seconds ago
|
|
lb running Up 20 seconds (healthy) 127.0.0.1:18086->8080/tcp, 127.0.0.1:26085->8404/tcp
|
|
loki running Up 19 seconds (healthy) 127.0.0.1:26310->3100/tcp
|
|
migrate exited Exited (0) 17 seconds ago
|
|
otel-collector running Up 19 seconds (healthy) 4317-4318/tcp, 55679/tcp
|
|
postgres running Up 20 seconds (healthy)
|
|
prometheus running Up 20 seconds (healthy) 127.0.0.1:26090->9090/tcp
|
|
relay running Up 13 seconds (healthy)
|
|
s3 running Up 20 seconds (healthy)
|
|
s3-init exited Exited (0) 14 seconds ago
|
|
tempo running Up 19 seconds (healthy) 127.0.0.1:26320->3200/tcp
|
|
valkey running Up 20 seconds (healthy)
|
|
worker running Up 13 seconds (healthy)
|
|
$ make test
|
|
python3 tests/smoke.py --base-url "http://127.0.0.1:18086"
|
|
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
|
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
|
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18086"
|
|
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
|
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
|
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18086"
|
|
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
|
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 3.19}
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
$ docker compose ps -a --format {{.Service}} {{.Name}} {{.State}} api
|
|
api hlpipe-lab6-clean-20261106094111-api-1 running
|
|
api hlpipe-lab6-clean-20261106094111-api-2 exited
|
|
$ make restore
|
|
scripts/restore.sh
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Running
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Starting
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Started
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Healthy
|
|
$ make scenario SCENARIO=failover-upload
|
|
python3 scripts/lab4_scenarios.py failover-upload --base-url "http://127.0.0.1:18086" --restore --output evidence/failover-upload.json
|
|
{
|
|
"ok": true,
|
|
"date": "2026-11-06T09:43:15Z",
|
|
"commit": "2903d9dc73171d988ed0a1118b42ba8e13eaa088",
|
|
"scenario": "failover-upload",
|
|
"upload_instance": "405a5a34e1f0",
|
|
"download_instance": "175536090b12",
|
|
"sha256_equal": true,
|
|
"hook_seconds": 2.793,
|
|
"download_ok_after_seconds": 2.857,
|
|
"replicas_at_download": [
|
|
{
|
|
"hostname": "175536090b12",
|
|
"status": "running",
|
|
"exit_code": "0",
|
|
"started_at": "2026-11-06T09:42:51.597999469Z",
|
|
"finished_at": "2026-11-06T09:42:45.065840757Z"
|
|
},
|
|
{
|
|
"hostname": "405a5a34e1f0",
|
|
"status": "exited",
|
|
"exit_code": "0",
|
|
"started_at": "2026-11-06T09:43:12.015906006Z",
|
|
"finished_at": "2026-11-06T09:43:19.750579801Z"
|
|
}
|
|
],
|
|
"restored": true,
|
|
"replicas_after_restore": [
|
|
{
|
|
"hostname": "175536090b12",
|
|
"status": "running",
|
|
"exit_code": "0",
|
|
"started_at": "2026-11-06T09:42:51.597999469Z",
|
|
"finished_at": "2026-11-06T09:42:45.065840757Z"
|
|
},
|
|
{
|
|
"hostname": "405a5a34e1f0",
|
|
"status": "running",
|
|
"exit_code": "0",
|
|
"started_at": "2026-11-06T09:43:20.21862376Z",
|
|
"finished_at": "2026-11-06T09:43:19.750579801Z"
|
|
}
|
|
]
|
|
}
|
|
scripts/lb-wait.sh
|
|
$ make restore
|
|
scripts/restore.sh
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Running
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Running
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Waiting
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Healthy
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Healthy
|
|
$ make scenario SCENARIO=s3-outage
|
|
python3 scripts/lab4_scenarios.py s3-outage --base-url "http://127.0.0.1:18086" --restore --output evidence/s3-outage.json
|
|
{
|
|
"ok": true,
|
|
"date": "2026-11-06T09:43:24Z",
|
|
"commit": "2903d9dc73171d988ed0a1118b42ba8e13eaa088",
|
|
"scenario": "s3-outage",
|
|
"s3_container_during_outage": [
|
|
{
|
|
"hostname": "00bac2bc8917",
|
|
"status": "exited",
|
|
"exit_code": "0",
|
|
"started_at": "2026-11-06T09:42:45.426583091Z",
|
|
"finished_at": "2026-11-06T09:43:25.572619096Z"
|
|
}
|
|
],
|
|
"during_outage": {
|
|
"upload": {
|
|
"status": 503,
|
|
"seconds": 4.43,
|
|
"instance": "175536090b12"
|
|
},
|
|
"metadata": {
|
|
"status": 200,
|
|
"seconds": 0.013,
|
|
"instance": "405a5a34e1f0"
|
|
},
|
|
"download": {
|
|
"status": 503,
|
|
"seconds": 2.333,
|
|
"instance": "175536090b12"
|
|
},
|
|
"text_message": {
|
|
"status": 201,
|
|
"seconds": 0.029,
|
|
"instance": "405a5a34e1f0"
|
|
},
|
|
"health_ready": {
|
|
"status": 200,
|
|
"seconds": 0.003,
|
|
"instance": "175536090b12"
|
|
}
|
|
},
|
|
"expected": {
|
|
"upload": 503,
|
|
"download": 503,
|
|
"text_message": 201
|
|
},
|
|
"as_expected": true,
|
|
"s3_back_healthy_seconds": 5.772,
|
|
"download_after_recovery": "sha256 equal"
|
|
}
|
|
scripts/lb-wait.sh
|
|
$ sh scripts/s3-check.sh
|
|
date: 2026-11-06T09:43:38Z commit: 2903d9dc73171d988ed0a1118b42ba8e13eaa088 == S3 privacy and bootstrap checks
|
|
PASS s3: опубликованные host-порты: нет
|
|
PASS s3: консоль :9001 внутри контейнера: 000
|
|
PASS s3-init: повторный запуск 1: 0
|
|
PASS s3-init: повторный запуск 2: 0
|
|
PASS s3-init: состояние IAM/bucket не изменилось: same
|
|
PASS api: PutObject: allow
|
|
PASS api: HeadObject: allow
|
|
PASS api: GetObject: allow
|
|
PASS api: ListBucket: deny
|
|
PASS reconciler: ListBucket: allow
|
|
PASS reconciler: HeadObject: allow
|
|
PASS reconciler: GetObject: allow
|
|
PASS reconciler: PutObject: deny
|
|
PASS reconciler: DeleteObject: allow
|
|
PASS reconciler: CreateBucket: deny
|
|
PASS reconciler: PutBucketPolicy (public): deny
|
|
PASS reconciler: admin ListUsers: deny
|
|
PASS api: CreateBucket: deny
|
|
PASS api: DeleteBucket: deny
|
|
PASS api: PutBucketPolicy (public): deny
|
|
PASS api: PutBucketLifecycle (HeadBucket уже 403): deny
|
|
PASS api: admin ListUsers: deny
|
|
PASS api: PutObject в чужой bucket: deny
|
|
PASS api: ListBucket чужого bucket: deny
|
|
PASS anonymous: HeadObject: deny
|
|
PASS anonymous: ListBucket: deny
|
|
PASS anonymous: PutObject: deny
|
|
PASS anonymous: прямой HTTP GET объекта из отдельного контейнера: 403
|
|
PASS bucket: anonymous policy: private
|
|
PASS api: DeleteObject: allow
|
|
PASS s3: консоль :9001 из отдельного контейнера сети стенда: connection refused
|
|
== IAM/bucket snapshot (без секретов)
|
|
{
|
|
"items": [
|
|
{
|
|
"key": "messenger-attachments",
|
|
"last_modified": "2026-11-06T09:42:23Z",
|
|
"is_dir": true
|
|
}
|
|
],
|
|
"truncated": false
|
|
}
|
|
{
|
|
"path": "root/messenger-attachments",
|
|
"permission": "private"
|
|
}
|
|
{
|
|
"name": "messenger-api",
|
|
"policy": {
|
|
"policy": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"s3:GetObject",
|
|
"s3:PutObject",
|
|
"s3:DeleteObject"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": [
|
|
"arn:aws:s3:::messenger-attachments/*"
|
|
],
|
|
"Sid": "MessengerApiObjects"
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"policy_name": "messenger-api"
|
|
}
|
|
}
|
|
{
|
|
"name": "messenger-reconciler",
|
|
"policy": {
|
|
"policy": {
|
|
"Statement": [
|
|
{
|
|
"Action": [
|
|
"s3:GetObject",
|
|
"s3:DeleteObject"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": [
|
|
"arn:aws:s3:::messenger-attachments/*"
|
|
],
|
|
"Sid": "MessengerReconcilerObjects"
|
|
},
|
|
{
|
|
"Action": [
|
|
"s3:ListBucket"
|
|
],
|
|
"Effect": "Allow",
|
|
"Resource": [
|
|
"arn:aws:s3:::messenger-attachments"
|
|
],
|
|
"Sid": "MessengerReconcilerListing"
|
|
}
|
|
],
|
|
"Version": "2012-10-17"
|
|
},
|
|
"policy_name": "messenger-reconciler"
|
|
}
|
|
}
|
|
{
|
|
"accessKey": "<api-key>",
|
|
"status": "enabled",
|
|
"policies": [
|
|
"messenger-api"
|
|
],
|
|
"memberOf": []
|
|
}
|
|
{
|
|
"accessKey": "<reconciler-key>",
|
|
"status": "enabled",
|
|
"policies": [
|
|
"messenger-reconciler"
|
|
],
|
|
"memberOf": []
|
|
}
|
|
{
|
|
"rules": [
|
|
{
|
|
"id": "abort-incomplete-uploads",
|
|
"status": "Enabled",
|
|
"prefix": "",
|
|
"abortIncompleteMultipartUploadDays": 1
|
|
}
|
|
]
|
|
}
|
|
RESULT: PASS
|
|
$ make reconcile
|
|
docker compose run --rm --no-deps reconciler
|
|
{
|
|
"mode": "dry-run",
|
|
"skipped": false,
|
|
"grace_seconds": 3600,
|
|
"skew_seconds": 60,
|
|
"deep": false,
|
|
"page_size": 1000,
|
|
"scanned": {
|
|
"objects": 0,
|
|
"rows": 0
|
|
},
|
|
"found": {
|
|
"orphan_stale": 0,
|
|
"orphan_fresh": 0,
|
|
"missing": 0,
|
|
"size_mismatch": 0,
|
|
"sha_mismatch": 0,
|
|
"pending_stale": 0,
|
|
"pending_fresh": 0,
|
|
"quarantined": 0,
|
|
"healed": 0
|
|
},
|
|
"fixed": {
|
|
"orphan_stale": 0,
|
|
"missing": 0,
|
|
"size_mismatch": 0,
|
|
"sha_mismatch": 0,
|
|
"pending_stale": 0,
|
|
"healed": 0
|
|
},
|
|
"rechecked": {},
|
|
"errors": 0,
|
|
"samples": {},
|
|
"cost": {
|
|
"seconds": 0.022,
|
|
"requests": {
|
|
"s3_list": 1,
|
|
"s3_head": 0,
|
|
"s3_get": 0,
|
|
"s3_delete": 0,
|
|
"sql": 1
|
|
},
|
|
"waited_seconds": {
|
|
"s3_list": 0.009,
|
|
"sql": 0.005
|
|
},
|
|
"hashed_bytes": 0,
|
|
"cpu_seconds": 0.655,
|
|
"max_rss_mib": 120.9
|
|
}
|
|
}
|
|
$ make migrate
|
|
docker compose run --rm migrate
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Running
|
|
$ make down
|
|
docker compose --profile bench --profile tools --profile reconcile down
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-grafana-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-lb-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-otel-collector-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-prometheus-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-tempo-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-loki-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-healthtools-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-relay-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-worker-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-broker-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-api-2 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-api-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-s3-init-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-migrate-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Stopping
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-valkey-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Stopped
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Removing
|
|
Container hlpipe-lab6-clean-20261106094111-s3-1 Removed
|
|
Container hlpipe-lab6-clean-20261106094111-postgres-1 Removed
|
|
Network hlpipe-lab6-clean-20261106094111_backend Removing
|
|
Network hlpipe-lab6-clean-20261106094111_edge Removing
|
|
Network hlpipe-lab6-clean-20261106094111_backend Removed
|
|
Network hlpipe-lab6-clean-20261106094111_edge Removed
|
|
$ docker volume ls --filter label=com.docker.compose.project=hlpipe-lab6-clean-20261106094111
|
|
DRIVER VOLUME NAME
|
|
local hlpipe-lab6-clean-20261106094111_broker-data
|
|
local hlpipe-lab6-clean-20261106094111_grafana-data
|
|
local hlpipe-lab6-clean-20261106094111_healthtools
|
|
local hlpipe-lab6-clean-20261106094111_loki-data
|
|
local hlpipe-lab6-clean-20261106094111_pgdata
|
|
local hlpipe-lab6-clean-20261106094111_prometheus-data
|
|
local hlpipe-lab6-clean-20261106094111_s3data
|
|
local hlpipe-lab6-clean-20261106094111_tempo-data
|
|
local hlpipe-lab6-clean-20261106094111_valkeydata
|
|
DRIVER VOLUME NAME
|
|
local hlpipe-lab6-clean-20261106094111_broker-data
|
|
local hlpipe-lab6-clean-20261106094111_grafana-data
|
|
local hlpipe-lab6-clean-20261106094111_healthtools
|
|
local hlpipe-lab6-clean-20261106094111_loki-data
|
|
local hlpipe-lab6-clean-20261106094111_pgdata
|
|
local hlpipe-lab6-clean-20261106094111_prometheus-data
|
|
local hlpipe-lab6-clean-20261106094111_s3data
|
|
local hlpipe-lab6-clean-20261106094111_tempo-data
|
|
local hlpipe-lab6-clean-20261106094111_valkeydata
|
|
exit_code: 0; volumes retained
|