lab7: безопасность, mTLS, OpenBao и PKI lifecycle
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
[
|
||||
{
|
||||
"phase": "warmup",
|
||||
"started_utc": "2026-11-06T08:37:06Z",
|
||||
"finished_utc": "2026-11-06T09:42:56Z",
|
||||
"firing": {},
|
||||
"pending_not_fired": {
|
||||
"APISLIMissing": 1
|
||||
},
|
||||
"page": 0,
|
||||
"ticket": 0
|
||||
},
|
||||
{
|
||||
"phase": "baseline",
|
||||
"started_utc": "2026-11-06T09:42:56Z",
|
||||
"finished_utc": "2026-11-06T10:02:51Z",
|
||||
"firing": {},
|
||||
"pending_not_fired": {},
|
||||
"page": 0,
|
||||
"ticket": 0
|
||||
},
|
||||
{
|
||||
"phase": "burst",
|
||||
"started_utc": "2026-11-06T10:02:51Z",
|
||||
"finished_utc": "2026-11-06T11:29:41Z",
|
||||
"firing": {},
|
||||
"pending_not_fired": {
|
||||
"APISLIMissing": 2
|
||||
},
|
||||
"page": 0,
|
||||
"ticket": 0
|
||||
},
|
||||
{
|
||||
"phase": "sustained",
|
||||
"started_utc": "2026-11-06T11:29:41Z",
|
||||
"finished_utc": "2026-11-06T11:49:53Z",
|
||||
"firing": {
|
||||
"APIErrorBudgetFastBurn": 1,
|
||||
"APIErrorBudgetSlowBurn": 1,
|
||||
"QueueMetricsStale": 1
|
||||
},
|
||||
"pending_not_fired": {},
|
||||
"page": 1,
|
||||
"ticket": 1
|
||||
},
|
||||
{
|
||||
"phase": "resolution_wait",
|
||||
"started_utc": "2026-11-06T11:49:53Z",
|
||||
"finished_utc": "2026-11-06T12:52:06Z",
|
||||
"firing": {},
|
||||
"pending_not_fired": {},
|
||||
"page": 0,
|
||||
"ticket": 0
|
||||
},
|
||||
{
|
||||
"phase": "ttr",
|
||||
"started_utc": "2026-11-06T12:52:06Z",
|
||||
"finished_utc": "2026-11-06T13:07:47Z",
|
||||
"firing": {
|
||||
"JobsOverdue": 1,
|
||||
"QueueOldestJobAgeCritical": 1,
|
||||
"QueueOldestJobAgeHigh": 1
|
||||
},
|
||||
"pending_not_fired": {},
|
||||
"page": 1,
|
||||
"ticket": 0
|
||||
},
|
||||
{
|
||||
"phase": "false-positive",
|
||||
"started_utc": "2026-11-06T13:07:47Z",
|
||||
"finished_utc": "2026-11-06T13:30:24Z",
|
||||
"firing": {},
|
||||
"pending_not_fired": {},
|
||||
"page": 0,
|
||||
"ticket": 0
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,11 @@
|
||||
# Alert episodes by phase
|
||||
|
||||
| phase | page | ticket | firing | pending-not-fired |
|
||||
|---|---:|---:|---|---|
|
||||
| warmup | 0 | 0 | {} | {'APISLIMissing': 1} |
|
||||
| baseline | 0 | 0 | {} | {} |
|
||||
| burst | 0 | 0 | {} | {'APISLIMissing': 2} |
|
||||
| sustained | 1 | 1 | {'APIErrorBudgetFastBurn': 1, 'APIErrorBudgetSlowBurn': 1, 'QueueMetricsStale': 1} | {} |
|
||||
| resolution_wait | 0 | 0 | {} | {} |
|
||||
| ttr | 1 | 0 | {'JobsOverdue': 1, 'QueueOldestJobAgeCritical': 1, 'QueueOldestJobAgeHigh': 1} | {} |
|
||||
| false-positive | 0 | 0 | {} | {} |
|
||||
@@ -0,0 +1,12 @@
|
||||
# Alert episodes by phase
|
||||
|
||||
| phase | page | ticket | firing | pending-not-fired |
|
||||
|---|---:|---:|---|---|
|
||||
| warmup | 0 | 0 | {} | {'APISLIMissing': 1} |
|
||||
| baseline | 0 | 0 | {} | {} |
|
||||
| burst | 0 | 0 | {} | {'APISLIMissing': 2} |
|
||||
| sustained | 1 | 1 | {'APIErrorBudgetFastBurn': 1, 'APIErrorBudgetSlowBurn': 1, 'QueueMetricsStale': 1} | {} |
|
||||
| resolution_wait | 0 | 0 | {} | {} |
|
||||
| ttr | 1 | 0 | {'JobsOverdue': 1, 'QueueOldestJobAgeCritical': 1, 'QueueOldestJobAgeHigh': 1} | {} |
|
||||
| false-positive | 0 | 0 | {} | {} |
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
UTC 2026-11-06T13:34:14Z
|
||||
HEAD 77fe98d775fdc07d5f9bfe04f7b4133c96c0849c
|
||||
$ make test
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
||||
$ make test-observability
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/check_evidence.py
|
||||
PASS: evidence has no obvious secrets, signed URLs or bearer tokens
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/lab6_verify.py --base-url "http://localhost:8080"
|
||||
NOTE: created request_id=lab6-verify-015163e6e039495c91258218e57f1a94
|
||||
PASS: lab6 strict telemetry gate (signals, trace/log correlation, labels, Grafana, rules, privacy sentinels)
|
||||
$ make test-slo
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/lab6_track2.py --base-url "http://localhost:8080"
|
||||
Container mtusi-messenger-lab6-postgres-1 Paused
|
||||
Container mtusi-messenger-lab6-postgres-1 Unpaused
|
||||
{
|
||||
"base_url": "http://localhost:8080",
|
||||
"rate": 0.5,
|
||||
"duration_s": 138.01,
|
||||
"scheduled": 70,
|
||||
"counters": {
|
||||
"accepted": 3,
|
||||
"ready": 3,
|
||||
"failed": 61,
|
||||
"messages": 56,
|
||||
"uploads": 3,
|
||||
"dropped": 0
|
||||
},
|
||||
"failures": 61,
|
||||
"failures_by_reason": {
|
||||
"http_503": 61
|
||||
},
|
||||
"failure_samples": [
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/attachments: expected [202], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/attachments: expected [202], received 503",
|
||||
"Failure: POST /api/v1/chats/01a1b111-5050-7eb1-b4d5-4a156e2010f4/messages: expected [201], received 503"
|
||||
],
|
||||
"latency_ms": {
|
||||
"p50": 6.7,
|
||||
"p95": 10.8,
|
||||
"p99": 10.8
|
||||
},
|
||||
"ttr_ms": {
|
||||
"p50": 633.4,
|
||||
"p95": 635.1,
|
||||
"p99": 635.1
|
||||
}
|
||||
}
|
||||
alert timeline: /Users/vladislav/Projects/mtusi2026lab6/evidence/lab6/track2/burst-alerts.csv
|
||||
track2 evidence: /Users/vladislav/Projects/mtusi2026lab6/evidence/lab6/track2 load_rc= 1 alerts_rc= 0
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"base_url": "http://localhost:8080",
|
||||
"rate": 0.2,
|
||||
"duration_s": 655.01,
|
||||
"scheduled": 132,
|
||||
"counters": {
|
||||
"accepted": 27,
|
||||
"ready": 27,
|
||||
"failed": 0,
|
||||
"messages": 105,
|
||||
"uploads": 27,
|
||||
"dropped": 0
|
||||
},
|
||||
"failures": 0,
|
||||
"failures_by_reason": {},
|
||||
"failure_samples": [],
|
||||
"latency_ms": {
|
||||
"p50": 6.2,
|
||||
"p95": 9.2,
|
||||
"p99": 11.9
|
||||
},
|
||||
"ttr_ms": {
|
||||
"p50": 646.2,
|
||||
"p95": 1265.8,
|
||||
"p99": 1268.0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
UTC 2026-11-05T22:39:30Z
|
||||
HEAD 639582280f0cc2236dee3140207168df23cc8bf1
|
||||
$ docker compose exec prometheus wget -qO- http://otel-collector:8888/metrics
|
||||
# HELP otelcol_exporter_queue_capacity Fixed capacity of the retry queue (in batches). [Alpha]
|
||||
# TYPE otelcol_exporter_queue_capacity gauge
|
||||
otelcol_exporter_queue_capacity{data_type="logs",exporter="otlp_http/loki"} 1.048576e+07
|
||||
otelcol_exporter_queue_capacity{data_type="traces",exporter="otlp_grpc/tempo"} 1.048576e+07
|
||||
# HELP otelcol_exporter_queue_size Current size of the retry queue (in batches). [Alpha]
|
||||
# TYPE otelcol_exporter_queue_size gauge
|
||||
otelcol_exporter_queue_size{data_type="logs",exporter="otlp_http/loki"} 0
|
||||
otelcol_exporter_queue_size{data_type="traces",exporter="otlp_grpc/tempo"} 0
|
||||
# HELP otelcol_receiver_failed_log_records The number of log records that failed to be processed by the receiver due to internal errors. [Alpha]
|
||||
# TYPE otelcol_receiver_failed_log_records counter
|
||||
otelcol_receiver_failed_log_records{receiver="otlp",transport="http"} 0
|
||||
# HELP otelcol_receiver_failed_metric_points The number of metric points that failed to be processed by the receiver due to internal errors. [Alpha]
|
||||
# TYPE otelcol_receiver_failed_metric_points counter
|
||||
otelcol_receiver_failed_metric_points{receiver="otlp",transport="http"} 0
|
||||
# HELP otelcol_receiver_failed_spans The number of spans that failed to be processed by the receiver due to internal errors. [Alpha]
|
||||
# TYPE otelcol_receiver_failed_spans counter
|
||||
otelcol_receiver_failed_spans{receiver="otlp",transport="http"} 0
|
||||
# HELP otelcol_receiver_refused_log_records Number of log records that could not be pushed into the pipeline. [Alpha]
|
||||
# TYPE otelcol_receiver_refused_log_records counter
|
||||
otelcol_receiver_refused_log_records{receiver="otlp",transport="http"} 0
|
||||
# HELP otelcol_receiver_refused_metric_points Number of metric points that could not be pushed into the pipeline. [Alpha]
|
||||
# TYPE otelcol_receiver_refused_metric_points counter
|
||||
otelcol_receiver_refused_metric_points{receiver="otlp",transport="http"} 0
|
||||
# HELP otelcol_receiver_refused_spans Number of spans that could not be pushed into the pipeline. [Alpha]
|
||||
# TYPE otelcol_receiver_refused_spans counter
|
||||
otelcol_receiver_refused_spans{receiver="otlp",transport="http"} 0
|
||||
@@ -0,0 +1,6 @@
|
||||
UTC 2026-11-06T13:33:57Z
|
||||
HEAD 77fe98d775fdc07d5f9bfe04f7b4133c96c0849c
|
||||
$ make integration-test
|
||||
go test -tags=integration -p 1 -count=1 -timeout=15m ./internal/storage/postgres ./internal/storage/redis
|
||||
ok mtusi-messenger/internal/storage/postgres 8.234s
|
||||
ok mtusi-messenger/internal/storage/redis 1.292s
|
||||
@@ -0,0 +1,84 @@
|
||||
UTC 2026-11-06T13:33:34Z
|
||||
HEAD 77fe98d775fdc07d5f9bfe04f7b4133c96c0849c
|
||||
$ make check
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
python3 scripts/check_s3_creds.py
|
||||
PASS: S3 app identity matches .env; admin stays in s3.json/s3-init
|
||||
$ make unit-test
|
||||
env -u APP_ENV -u SERVER_HOST -u SERVER_PORT -u SERVER_READ_HEADER_TIMEOUT -u SERVER_READ_TIMEOUT -u SERVER_SHUTDOWN_TIMEOUT -u SERVER_MAX_BODY_BYTES -u LOG_LEVEL -u LOG_FORMAT -u POSTGRES_HOST -u POSTGRES_PORT -u POSTGRES_DATABASE -u POSTGRES_USER -u POSTGRES_PASSWORD -u POSTGRES_SSL_MODE -u POSTGRES_MAX_CONNS -u POSTGRES_MIN_CONNS -u POSTGRES_MAX_CONN_LIFETIME -u POSTGRES_MAX_CONN_IDLE_TIME -u POSTGRES_CONNECT_TIMEOUT -u POSTGRES_QUERY_TIMEOUT -u REDIS_ENABLED -u REDIS_HOST -u REDIS_PORT -u REDIS_PASSWORD -u REDIS_DB -u REDIS_MAX_RETRIES -u REDIS_DIAL_TIMEOUT -u REDIS_READ_TIMEOUT -u REDIS_WRITE_TIMEOUT -u REDIS_POOL_SIZE -u CACHE_ENABLED -u CACHE_CHAT_LIST_TTL -u CACHE_LOCK_TTL -u CACHE_LOCK_WAIT_TIMEOUT -u SESSION_TTL_SECONDS -u IDEMPOTENCY_TTL_SECONDS -u API_REPLICAS -u API_CPU_LIMIT -u API_MEM_LIMIT -u POSTGRES_MAX_CONNS -u POSTGRES_CPU_LIMIT -u POSTGRES_MEM_LIMIT -u LB_STATS_PORT -u S3_ENDPOINT -u S3_PUBLIC_ENDPOINT -u S3_PORT -u S3_REGION -u S3_BUCKET -u S3_ACCESS_KEY_ID -u S3_SECRET_ACCESS_KEY -u MAX_UPLOAD_BYTES -u MAX_IMAGE_PIXELS -u S3_PRESIGN_TTL -u S3_SWEEP_INTERVAL -u S3_SWEEP_GRACE -u BROKER_USER -u BROKER_PASSWORD -u BROKER_VHOST -u BROKER_URL -u BROKER_EXCHANGE -u BROKER_QUEUE -u BROKER_DLX -u BROKER_DLQ -u BROKER_MANAGEMENT_PORT -u BROKER_CPU_LIMIT -u BROKER_MEM_LIMIT -u WORKER_CONCURRENCY -u WORKER_PREFETCH -u WORKER_CPU_LIMIT -u WORKER_MEM_LIMIT -u WORKER_SHUTDOWN_TIMEOUT -u WORKER_HEALTH_PORT -u PROCESSING_PIPELINE_VERSION -u PROCESSING_MAX_ATTEMPTS -u PROCESSING_JOB_TIMEOUT -u PROCESSING_LEASE_TTL -u PROCESSING_HEARTBEAT -u PROCESSING_RETRY_BASE -u PROCESSING_RETRY_CAP -u OUTBOX_POLL_INTERVAL -u OUTBOX_CLAIM_TTL -u OUTBOX_BATCH -u OUTBOX_REAPER_INTERVAL -u OUTBOX_RECONCILE_AFTER -u OUTBOX_RETENTION -u RELAY_CPU_LIMIT -u RELAY_MEM_LIMIT -u RELAY_HEALTH_PORT -u STAGING_ORPHAN_GRACE -u STAGING_FAILED_RETENTION -u ADMISSION_MAX_PENDING_PER_USER -u ADMISSION_MAX_PENDING -u ADMISSION_MAX_STAGED_BYTES -u ADMISSION_MAX_CONCURRENT_UPLOADS -u OTEL_EXPORTER_OTLP_ENDPOINT -u OTEL_EXPORTER_OTLP_PROTOCOL -u OTEL_RESOURCE_ATTRIBUTES -u OTEL_METRIC_EXPORT_INTERVAL -u TELEMETRY_ENABLED -u PROMETHEUS_PORT -u LOKI_PORT -u TEMPO_PORT -u GRAFANA_PORT -u OTEL_COLLECTOR_CPU_LIMIT -u OTEL_COLLECTOR_MEM_LIMIT -u PROMETHEUS_CPU_LIMIT -u PROMETHEUS_MEM_LIMIT -u LOKI_CPU_LIMIT -u LOKI_MEM_LIMIT -u TEMPO_CPU_LIMIT -u TEMPO_MEM_LIMIT -u GRAFANA_CPU_LIMIT -u GRAFANA_MEM_LIMIT go test -race -shuffle=on -count=1 -timeout=5m ./...
|
||||
? mtusi-messenger/cmd/jobctl [no test files]
|
||||
? mtusi-messenger/cmd/messenger [no test files]
|
||||
? mtusi-messenger/cmd/migrate [no test files]
|
||||
? mtusi-messenger/cmd/relay [no test files]
|
||||
? mtusi-messenger/cmd/s3init [no test files]
|
||||
? mtusi-messenger/cmd/worker [no test files]
|
||||
? mtusi-messenger/internal/broker [no test files]
|
||||
ok mtusi-messenger/internal/config 1.747s
|
||||
ok mtusi-messenger/internal/domain 2.759s
|
||||
? mtusi-messenger/internal/failpoint [no test files]
|
||||
ok mtusi-messenger/internal/health 2.400s
|
||||
ok mtusi-messenger/internal/imagecheck 2.085s
|
||||
ok mtusi-messenger/internal/imageproc 3.626s
|
||||
ok mtusi-messenger/internal/logger 3.554s
|
||||
? mtusi-messenger/internal/outbox [no test files]
|
||||
ok mtusi-messenger/internal/platform/cache 4.833s
|
||||
? mtusi-messenger/internal/platform/cache/mocks [no test files]
|
||||
? mtusi-messenger/internal/platform/instanceid [no test files]
|
||||
ok mtusi-messenger/internal/platform/objectstore 3.918s
|
||||
ok mtusi-messenger/internal/platform/password 5.632s
|
||||
ok mtusi-messenger/internal/platform/token 4.941s
|
||||
ok mtusi-messenger/internal/service/attachment 5.544s
|
||||
? mtusi-messenger/internal/service/attachment/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/chat 5.919s
|
||||
? mtusi-messenger/internal/service/chat/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/message 6.281s
|
||||
? mtusi-messenger/internal/service/message/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/session 6.928s
|
||||
? mtusi-messenger/internal/service/session/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/user 7.266s
|
||||
? mtusi-messenger/internal/service/user/mocks [no test files]
|
||||
ok mtusi-messenger/internal/storage/postgres 7.689s
|
||||
? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files]
|
||||
? mtusi-messenger/internal/storage/postgres/migrations [no test files]
|
||||
? mtusi-messenger/internal/storage/redis [no test files]
|
||||
? mtusi-messenger/internal/storage/redis/mocks [no test files]
|
||||
ok mtusi-messenger/internal/telemetry 8.058s
|
||||
ok mtusi-messenger/internal/transport/rest 8.529s
|
||||
? mtusi-messenger/internal/transport/rest/internal/oas [no test files]
|
||||
? mtusi-messenger/internal/transport/rest/mocks [no test files]
|
||||
ok mtusi-messenger/internal/worker 7.565s
|
||||
? mtusi-messenger/tools/specgen [no test files]
|
||||
$ make lint
|
||||
/Users/vladislav/Projects/mtusi2026lab6/bin/golangci-lint run -v
|
||||
level=info msg="golangci-lint has version 2.13.2 built with go1.27.1 from (unknown, modified: ?, mod sum: \"h1:bCyq3E4vo9qwzifjpzJqYndEt7Ncva80qkk8G2B4TXU=\") on (unknown)"
|
||||
level=info msg="[config_reader] Config search paths: [./ /Users/vladislav/Projects/mtusi2026lab6 /Users/vladislav/Projects /Users/vladislav /Users /]"
|
||||
level=info msg="[config_reader] Used config file .golangci.yml"
|
||||
level=info msg="[config_reader] Module name \"mtusi-messenger\""
|
||||
level=info msg="[goenv] Read go env for 5.452167ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}"
|
||||
level=info msg="[lintersdb] Active 50 linters: [asasalint bodyclose canonicalheader containedctx contextcheck copyloopvar depguard durationcheck errcheck errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert gocheckcompilerdirectives gocritic gofumpt goimports gomoddirectives gosec govet ineffassign intrange makezero misspell musttag nilerr nilnil noctx nolintlint perfsprint prealloc reassign recvcheck revive rowserrcheck sloglint sqlclosecheck staticcheck testifylint thelper tparallel unconvert unparam unused usestdlibvars usetesting wastedassign]"
|
||||
level=info msg="[loader] Using build tags: [integration]"
|
||||
level=info msg="[loader] Go packages loading at mode 8767 (exports_file|types_sizes|compiled_files|deps|files|imports|name) took 328.172459ms"
|
||||
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 8.257709ms"
|
||||
level=info msg="[linters_context/goanalysis] analyzers took 0s with no stages"
|
||||
level=info msg="[runner/exclusion_rules] Skipped 15 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]"
|
||||
level=info msg="[runner] Issues before processing: 894, after processing: 0"
|
||||
level=info msg="[runner] Processors filtering stat (in/out): path_absoluter: 894/894, cgo: 894/894, exclusion_paths: 894/894, exclusion_rules: 305/6, filename_unadjuster: 894/894, invalid_issue: 894/894, nolint_filter: 6/0, path_relativity: 894/894, generated_file_filter: 894/305"
|
||||
level=info msg="[runner] processing took 3.308334ms with stages: generated_file_filter: 1.592083ms, nolint_filter: 799.625µs, path_relativity: 567.333µs, exclusion_rules: 281.584µs, cgo: 27.917µs, invalid_issue: 16.916µs, path_absoluter: 10.542µs, filename_unadjuster: 6.208µs, sort_results: 3.876µs, max_same_issues: 625ns, exclusion_paths: 417ns, fixer: 292ns, max_from_linter: 208ns, source_code: 125ns, path_prettifier: 125ns, path_shortener: 124ns, max_per_file_from_linter: 84ns, severity-rules: 84ns, uniq_by_line: 83ns, diff: 83ns"
|
||||
level=info msg="[runner] linters took 715.361458ms with stages: goanalysis_metalinter: 712.008375ms"
|
||||
0 issues.
|
||||
level=info msg="File cache stats: 0 entries of total size 0B"
|
||||
level=info msg="Memory: 12 samples, avg is 83.2MB, max is 111.1MB"
|
||||
level=info msg="Execution took 1.057716875s"
|
||||
$ go vet ./...
|
||||
$ promtool check rules
|
||||
Checking /etc/prometheus/rules/alerts.yml
|
||||
SUCCESS: 15 rules found
|
||||
|
||||
Checking /etc/prometheus/rules/slo.yml
|
||||
SUCCESS: 10 rules found
|
||||
|
||||
$ promtool test rules
|
||||
SUCCESS
|
||||
|
||||
$ docker compose config -q
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"base_url": "http://localhost:8080",
|
||||
"rate": 0.2,
|
||||
"duration_s": 775.03,
|
||||
"scheduled": 156,
|
||||
"counters": {
|
||||
"accepted": 31,
|
||||
"ready": 31,
|
||||
"failed": 0,
|
||||
"messages": 125,
|
||||
"uploads": 31,
|
||||
"dropped": 0
|
||||
},
|
||||
"failures": 0,
|
||||
"failures_by_reason": {},
|
||||
"failure_samples": [],
|
||||
"latency_ms": {
|
||||
"p50": 7.7,
|
||||
"p95": 10.5,
|
||||
"p99": 12.4
|
||||
},
|
||||
"ttr_ms": {
|
||||
"p50": 955.9,
|
||||
"p95": 1265.6,
|
||||
"p99": 1266.7
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
UTC 2026-11-05T22:44:18Z
|
||||
HEAD 639582280f0cc2236dee3140207168df23cc8bf1
|
||||
$ student-tests/lab5_faults.py
|
||||
permanent failure: failed/injected_failure, content 409, failed attachment not linkable, registry visible
|
||||
replay: failed -> queued -> ready, one thumbnail
|
||||
replay ready job: refused
|
||||
replay older failed version while v2 queued: refused, state intact
|
||||
v2 published after older replay refusal
|
||||
replay of failed reprocess: queued projection restored, then ready at pipeline 2
|
||||
transient exhaustion: attempts=5, retry_exhausted, four retries, DLQ message present
|
||||
crash after first variant: redelivered, same three variants, attempts=2
|
||||
crash after commit before ack: ready remains, redelivery is a no-op
|
||||
crash after claim before side effect: requeued, attempts=2, ready
|
||||
outbox gap: crash before publish recovered through the relay, outbox published, ready
|
||||
lease expiry: paused worker, reaper requeued, stale attempt fenced, ready
|
||||
PASS: lab5 level 4 fault injection
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,47 @@
|
||||
UTC 2026-11-06T00:30:14Z
|
||||
HEAD 935b228d0b55ac60d00cdc855218ec45e20f2530
|
||||
$ /api/v1/rules (contains or vector(0))
|
||||
or_vector_0= True
|
||||
json_len= 12780
|
||||
$ pre ALERTS []
|
||||
$ stop worker
|
||||
|
||||
t=30s ratio5=MISSING ratio1h=MISSING missed_total=100 missed_inc5=0 bucket_count=10 overdue=0 oldest=12.610594 alerts=[]
|
||||
t=60s ratio5=MISSING ratio1h=MISSING missed_total=100 missed_inc5=0 bucket_count=10 overdue=3 oldest=42.61288 alerts=[["JobsOverdue", "pending"]]
|
||||
t=90s ratio5=MISSING ratio1h=MISSING missed_total=106 missed_inc5=6.2756181818181815 bucket_count=10 overdue=9 oldest=72.614253 alerts=[["JobsOverdue", "pending"]]
|
||||
t=120s ratio5=0.923076923076923 ratio1h=0.9230769230769231 missed_total=112 missed_inc5=12.435503224838758 bucket_count=10 overdue=15 oldest=102.611122 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "pending"]]
|
||||
t=150s ratio5=0.9473684210526316 ratio1h=0.9473684210526315 missed_total=118 missed_inc5=18.549592785748487 bucket_count=10 overdue=23 oldest=132.508928 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "pending"]]
|
||||
t=180s ratio5=0.962962962962963 ratio1h=0.962962962962963 missed_total=126 missed_inc5=26.679560826021273 bucket_count=10 overdue=29 oldest=162.508223 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=210s ratio5=0.9696969696969697 ratio1h=0.9696969696969698 missed_total=132 missed_inc5=32.73157721245076 bucket_count=10 overdue=35 oldest=192.509517 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=240s ratio5=0.9743589743589745 ratio1h=0.9743589743589743 missed_total=138 missed_inc5=38.77170399329681 bucket_count=10 overdue=43 oldest=222.509683 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=270s ratio5=0.9787234042553192 ratio1h=0.9787234042553192 missed_total=146 missed_inc5=46.84163777134747 bucket_count=10 overdue=49 oldest=252.509732 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=300s ratio5=0.9811320754716981 ratio1h=0.9811320754716981 missed_total=152 missed_inc5=52.8994672752366 bucket_count=10 overdue=55 oldest=282.510069 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=330s ratio5=1 ratio1h=0.9829645869209094 missed_total=158 missed_inc5=59.00325196084083 bucket_count=MISSING overdue=63 oldest=312.51145 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=360s ratio5=1 ratio1h=0.9849866155016431 missed_total=166 missed_inc5=67.14185921911984 bucket_count=MISSING overdue=69 oldest=342.509047 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=390s ratio5=1 ratio1h=0.9862112005033712 missed_total=172 missed_inc5=67.14163154164646 bucket_count=MISSING overdue=75 oldest=372.509037 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=420s ratio5=1 ratio1h=0.9872508295058324 missed_total=178 missed_inc5=67.14185921911984 bucket_count=MISSING overdue=83 oldest=402.510244 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=450s ratio5=1 ratio1h=0.9884172689944903 missed_total=186 missed_inc5=69.15254237288136 bucket_count=MISSING overdue=89 oldest=432.509801 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=480s ratio5=1 ratio1h=0.9891595307016704 missed_total=192 missed_inc5=67.11750648294097 bucket_count=MISSING overdue=95 oldest=462.508192 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=510s ratio5=1 ratio1h=0.9898124841753306 missed_total=198 missed_inc5=67.11864406779661 bucket_count=MISSING overdue=103 oldest=492.508813 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=540s ratio5=1 ratio1h=0.9905707750128784 missed_total=206 missed_inc5=69.15207354526409 bucket_count=MISSING overdue=109 oldest=522.508408 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=570s ratio5=1 ratio1h=0.9910685528663303 missed_total=212 missed_inc5=67.14185921911982 bucket_count=MISSING overdue=115 oldest=552.510401 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=600s ratio5=1 ratio1h=0.9915177473866992 missed_total=218 missed_inc5=67.14254226080469 bucket_count=MISSING overdue=123 oldest=582.406662 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=630s ratio5=1 ratio1h=0.9920498972652931 missed_total=226 missed_inc5=69.17622643684787 bucket_count=MISSING overdue=129 oldest=612.40958 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=660s ratio5=1 ratio1h=0.9924066715178286 missed_total=232 missed_inc5=67.14163154164646 bucket_count=MISSING overdue=135 oldest=642.40658 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=690s ratio5=1 ratio1h=0.9927327859192547 missed_total=238 missed_inc5=67.14276994445463 bucket_count=MISSING overdue=143 oldest=672.408057 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "pending"], ["JobsOverdue", "firing"]]
|
||||
t=720s ratio5=1 ratio1h=0.9931268165094485 missed_total=246 missed_inc5=69.17528814559364 bucket_count=MISSING overdue=149 oldest=702.408433 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "pending"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
t=750s ratio5=1 ratio1h=0.9933950961225724 missed_total=252 missed_inc5=67.14163154164646 bucket_count=MISSING overdue=155 oldest=732.408746 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "firing"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
t=780s ratio5=1 ratio1h=0.993643194764043 missed_total=258 missed_inc5=67.14185921911982 bucket_count=MISSING overdue=163 oldest=762.409049 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "firing"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
t=810s ratio5=1 ratio1h=0.9939467049022863 missed_total=266 missed_inc5=69.17622643684787 bucket_count=MISSING overdue=169 oldest=792.41206 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "firing"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
t=840s ratio5=1 ratio1h=0.9941557453893992 missed_total=272 missed_inc5=67.14163154164646 bucket_count=MISSING overdue=175 oldest=822.407542 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "firing"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
t=870s ratio5=1 ratio1h=0.9943508304157103 missed_total=278 missed_inc5=67.11932663722003 bucket_count=MISSING overdue=183 oldest=852.407439 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "firing"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
t=900s ratio5=1 ratio1h=0.9945917759853372 missed_total=286 missed_inc5=69.15230795827812 bucket_count=MISSING overdue=189 oldest=882.407004 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "firing"], ["QueueOldestJobAgeCritical", "pending"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
t=930s ratio5=1 ratio1h=0.9947592532907682 missed_total=292 missed_inc5=67.11841654774052 bucket_count=MISSING overdue=195 oldest=912.40742 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"], ["QueueOldestJobAgeHigh", "firing"], ["QueueOldestJobAgeCritical", "firing"], ["QueueDepthGrowing", "firing"], ["JobsOverdue", "firing"]]
|
||||
$ start worker
|
||||
|
||||
recovery t=30s ratio5=1 ratio1h=0.8602719300487442 missed_total=300 overdue=0 oldest=0 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"]]
|
||||
recovery t=60s ratio5=0.46027848712991326 ratio1h=0.6701622041415539 missed_total=300 overdue=0 oldest=0 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"]]
|
||||
recovery t=120s ratio5=0.28651555183796223 ratio1h=0.5530347475575486 missed_total=300 overdue=0 oldest=0 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"]]
|
||||
recovery t=180s ratio5=0.19892599842282524 ratio1h=0.4741651045063767 missed_total=300 overdue=0 oldest=0 alerts=[["TTRErrorBudgetFastBurn", "firing"], ["TTRErrorBudgetSlowBurn", "firing"]]
|
||||
recovery t=240s ratio5=0.14269663063401883 ratio1h=0.4150096929787228 missed_total=300 overdue=0 oldest=0 alerts=[["TTRErrorBudgetSlowBurn", "firing"]]
|
||||
recovery t=300s ratio5=0.09905644731015488 ratio1h=0.3703642198471703 missed_total=300 overdue=0 oldest=0 alerts=[["TTRErrorBudgetSlowBurn", "firing"]]
|
||||
@@ -0,0 +1,28 @@
|
||||
UTC 2026-11-05T22:40:16Z
|
||||
HEAD 639582280f0cc2236dee3140207168df23cc8bf1
|
||||
$ load + stop worker
|
||||
Container mtusi-messenger-lab6-worker-1 Stopping
|
||||
Container mtusi-messenger-lab6-worker-1 Stopped
|
||||
$ ttr ratio during outage
|
||||
{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"slo:job_ttr_bad_ratio:5m"},"value":[1793918511.951,"0.6265581574633149"]}]}}
|
||||
$ alerts during outage
|
||||
[('TTRErrorBudgetFastBurn', 'firing')]
|
||||
$ start worker
|
||||
Container mtusi-messenger-lab6-seaweedfs-1 Waiting
|
||||
Container mtusi-messenger-lab6-postgres-1 Waiting
|
||||
Container mtusi-messenger-lab6-postgres-1 Healthy
|
||||
Container mtusi-messenger-lab6-seaweedfs-1 Healthy
|
||||
Container mtusi-messenger-lab6-migrate-1 Starting
|
||||
Container mtusi-messenger-lab6-s3-init-1 Starting
|
||||
Container mtusi-messenger-lab6-migrate-1 Started
|
||||
Container mtusi-messenger-lab6-s3-init-1 Started
|
||||
Container mtusi-messenger-lab6-broker-1 Waiting
|
||||
Container mtusi-messenger-lab6-postgres-1 Waiting
|
||||
Container mtusi-messenger-lab6-migrate-1 Waiting
|
||||
Container mtusi-messenger-lab6-s3-init-1 Waiting
|
||||
Container mtusi-messenger-lab6-migrate-1 Exited
|
||||
Container mtusi-messenger-lab6-postgres-1 Healthy
|
||||
Container mtusi-messenger-lab6-s3-init-1 Exited
|
||||
Container mtusi-messenger-lab6-broker-1 Healthy
|
||||
Container mtusi-messenger-lab6-worker-1 Starting
|
||||
Container mtusi-messenger-lab6-worker-1 Started
|
||||
Reference in New Issue
Block a user