The "Scan Floating IP" button failed with a client timeout: the project now holds ~6.4k floating IPs and the scan listed them all in one unpaginated, timeout-less Neutron request on the HTTP request context. openstack: ListFreeFloatingIPs reads marker-based pages (fields= keeps them small) with per-page retry/backoff on transport errors, 5xx and 429, and every request now has a timeout (also ends hangs inside the orchestrator tick). orchestrator: the scan is a single-flight background job on the process context with progress (clearing/listing/enqueuing/done/error), dry_run, full discovery before anything is enqueued, then SubmitIPs in chunks of 500 in ascending IP order; a failed read leaves the queue untouched. The auto-cycle gets a "scanning" phase that polls the job, so the control loop and autoCycleMu are never held across OpenStack/DB work; it recovers after a restart and waits for (instead of adopting) a scan started by someone else. db: migration 0009 (indexes), paged ListIPsPage/ListRegistryPage, GROUP BY counters, EXISTS completion check, set-based ClearAllIPs. API: POST /admin/ips/scan -> 202 (dry_run, wait), GET /admin/ips/scan, paging and filters on /admin/ips and /admin/registry (bare arrays without limit), results_by_overall in /admin/status. dashboard: scan progress panel and dry-run button, paginated /ips and /registry with server-side filters, Overview on counters and capped lists with progress/ETA, "select all N by filter", hx-params fix for per-row buttons, real counts in confirmations. Also: docs (API, USAGE, DASHBOARD, README), plan and review under docs/changes/, bin/ rebuilt with new SHA256SUMS. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
# Ready-to-copy control-api config for `docker compose` dev use — mock
|
|
# OpenStack mode (no credentials needed) with minimal seed data matching
|
|
# deploy/docker/.env.example's PROBER_SITE_ID / VALIDATOR_AGENT_VALIDATOR_ID
|
|
# defaults, so `docker compose up` works out of the box after:
|
|
#
|
|
# cp control-api.docker.example.yaml control-api.docker.yaml
|
|
#
|
|
# For a real deployment, start from configs/control-api.example.yaml
|
|
# instead (full schema reference, openstack.mode: real).
|
|
|
|
server:
|
|
listen_addr: ":8080"
|
|
|
|
database:
|
|
path: "/var/lib/cloud-ip-validator/control-api.db"
|
|
|
|
openstack:
|
|
mode: "mock"
|
|
# Постраничное чтение Floating IP / page size of the paged listing (default 200)
|
|
list_page_size: 200
|
|
|
|
# Статические bearer-токены читаются из переменных окружения контейнера с
|
|
# этими именами (задаются в .env, см. deploy/docker/.env.example). Пусто =
|
|
# соответствующий уровень API открыт (с предупреждением в логе).
|
|
auth:
|
|
admin_token_env: "CONTROL_API_ADMIN_TOKEN" # защищает /api/v1/admin/*
|
|
agent_token_env: "CONTROL_API_AGENT_TOKEN" # защищает запись результатов агентами/пробером
|
|
|
|
orchestrator:
|
|
poll_interval_seconds: 5
|
|
self_check_timeout_seconds: 60
|
|
max_self_check_retries: 3
|
|
checking_window_seconds: 120
|
|
max_retries: 3
|
|
lease_ttl_seconds: 180
|
|
heartbeat_timeout_seconds: 30
|
|
fip_settle_seconds: 0
|
|
fip_scan_interval_seconds: 0
|
|
fip_scan_timeout_seconds: 1800 # общий таймаут фонового скана / scan deadline
|
|
|
|
aggregation:
|
|
missing_counts_as_fail: true
|
|
|
|
validators:
|
|
- validator_id: "validator_01"
|
|
os_port_id: "mock-port-1"
|
|
|
|
sites:
|
|
- site_id: "site-1"
|
|
index: 1
|
|
|
|
check_types:
|
|
- name: "https"
|
|
enabled: true
|
|
targets: ["default-targets"]
|
|
- name: "icmp"
|
|
enabled: true
|
|
targets: ["default-targets"]
|
|
- name: "ssh"
|
|
enabled: false
|
|
targets: []
|
|
|
|
targets:
|
|
default-targets:
|
|
- "https://hub.docker.com"
|
|
- "https://github.com"
|
|
- "https://packages.ubuntu.com"
|
|
|
|
inbound_checks:
|
|
ports: [22, 80, 443, 8080]
|
|
icmp: true
|
|
|
|
ip_addresses:
|
|
- "203.0.113.10"
|
|
- "203.0.113.11"
|
|
- "203.0.113.12"
|