Commit Graph
15 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 3f22c4ae29 Drop stale docs/ references from scripts, tools and deploy files; add rope-regeneration.json 2026-11-23 09:34:33 +01:00
Pavlo Ratushnyi 94592f4fa0 wip: rename strata-next/strata-control/strata-desktop-core (to be squashed in the final rename commit) 2026-11-14 20:30:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e45bb83808 ops: owner-wifi-stability.sh, Wi-Fi watchdog for rnr5090 (gateway ping, escalating recovery, failure snapshots in /run)
show | install | remove | status, --dry-run; optional --disable-powersave (+ --install-iw), --disable-aspm, --reboot-after-min.
Tested read-only on the server (show, install/remove --dry-run, run --dry-run --simulate-fail); install was not run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 00:02:20 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 61a0eb7375 Unit: a valid Documentation URL (systemd-analyze verify on the server flagged the old one)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 21:14:20 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2ca7e86d72 Owner install artifacts and docs/unattended.md: systemd install script, lab mode, exact owner steps
scripts/ops/install-leleka-service.sh (owner runs it with sudo; nothing here was run by an agent):
  --install [--no-start] [--force]   copies scripts/ops/leleka.service to /etc/systemd/system, daemon-reload, enable, start; refuses when the
                                     state is not prepared, a binary is missing, the user para does not exist, or the lab KAR holder runs
  --remove                           stop, disable, remove the unit (state, logs, models untouched)
  --status                           unprivileged: systemd state, lab mode, the supervisor's status.json (phase, uptime, restarts and reason, health), log tail
  --lab on|off                       STATE/lab-mode: the unit (ConditionPathExists=!) stays down while the GPU belongs to the lab queue

docs/unattended.md: what runs, the exact owner steps (prepare with `leleka up --mode none`, install, use, look, update), lab mode, the fast cold
load (problem, change, measurements), the supervision table (what happens for every failure), logs and disk, security defaults, the soak test
(harness, criteria, the multi-day command), open items. docs/deploy.md section 6 follows the new restart, log and status behaviour.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 21:13:29 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 55413eba07 Supervision for an unattended host: engine restarts with backoff, a hang detector, bounded logs, API limits, a hardened unit
`leleka run` restarted a crashed engine twice after a fixed 5 s and then ended the service; a hung engine, a growing log and a client
waiting on a dead engine had no answer. All of it is now in the supervisor and in what `leleka up` writes:

* Restart with backoff (config.rs RestartPolicy backoff_initial_s 5 / backoff_max_s 300, max_engine_restarts 6 in a row, reset after 600 s
  of ready): recover_engine() waits 5, 10, 20 ... s, counts a restart that fails (load refused, port taken) as an attempt and retries it
  instead of ending the service; only after the last attempt does the supervisor exit 1 and let systemd start everything afresh.
* Hang detector (watchdog.rs, pure and tested; HealthPolicy in leleka.json: interval 10 s, fail 120 s, max_request 3900 s): every 10 s the
  supervisor reads GET /metrics of the API (the control plane's own view; the engine's telemetry is not used, the API refreshes it only
  between requests). API unreachable 120 s: restart the API. Worker not ready 120 s (the API lost the engine): SIGKILL and restart the
  engine. A request active longer than 3900 s (generation_timeout 3600 + 300): the same. A stopped (SIGSTOP) or deadlocked engine ends this way.
* Requests get an error, not a hang: strata.json now carries runtime.stall_timeout_s 600 (no engine event for 10 min during a request cancels
  it with an error to the client) and generation_timeout_s 3600 (RequestLimits in leleka.json).
* Bounded logs (logs.rs): every 10 s the supervisor copy-truncates any STATE/logs/*.log past 16 MiB, keeps 3 generations (children keep
  their O_APPEND descriptors, nothing is told); <= 16 x 4 x 6 files; one 16 MiB copy per rotation. tail_of reads only the last 256 KiB.
* Status file: started_unix, restarts_total, last_restart_unix/reason, health, log_bytes; rewritten every 30 s as a heartbeat.
* units.rs (and scripts/ops/leleka.service, a test pins the file to the generator for the server layout): StartLimitIntervalSec=0 with
  RestartSteps/RestartMaxDelaySec (30 s growing to 10 min), LimitCORE=0 (a 100 GB core dump must not hit the root NVMe), LimitNOFILE,
  TasksMax, OOMScoreAdjust=-500 (system scope), journal rate limit, RequiresMountsFor, TimeoutStopSec 180, and ConditionPathExists=!STATE/lab-mode
  so the unit stays down while the GPU belongs to the lab queue.
* Tests (fake runtime, no GPU): a reported hang kills and replaces the engine; restarts back off, a start that fails twice and then works is
  just a slower restart, three failures in a row end the service with a message; an oversize log is rotated while the service runs; the
  existing lifecycle tests (SIGKILL of the engine, SIGTERM drain) still pass. 134 unit tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 20:55:25 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 221801b34d ops: rescue sshd: correct passwd, pkill pattern that cannot match its caller; verified in an isolated namespace (login + pty)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:43:23 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c7d638c8a4 ops: rescue sshd /dev as its own tmpfs (/run is nodev, device nodes were unusable)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:40:03 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 8e8194dfeb ops: rescue unit no longer disables itself on stop; watchdog loaded from a unit (Ubuntu deny-lists the module)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:11:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7b037f6092 ops: rescue sshd no longer bind-mounts /dev (shared propagation unmounted the host's /dev/pts, shm, mqueue, hugepages); own nodes + new devpts instance; private mounts before teardown
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:05:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cc88c5357c ops: rescue sshd: reliable teardown (process title, recursive unmount, no rm under a mount), single build via unit restart
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:01:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cf728876db ops: rescue sshd build no longer aborts on static busybox; cp backup idempotent
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 11:59:23 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9159e4eee5 ops: fsfreeze-based test that the RAM-only rescue sshd works while / and /data block writes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 11:46:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 196c0639e4 ops: RAM-only rescue sshd (port 2222) and netconsole for when the root NVMe stalls (owner-run, untested)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 11:45:46 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7e66b9491f ops: server script to reboot instead of hang when the root NVMe stalls (owner-run, dry run by default)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 11:35:38 +01:00