workspace и reboot-модуль: второй продакшн бинарь и упаковка
This commit is contained in:
@@ -412,13 +412,13 @@ The old status banner “system ready” is not enough. Rust status must be fals
|
||||
|
||||
## 16. Reboot module integration
|
||||
|
||||
Move existing `reboot_module` logic into `reboot.rs`:
|
||||
Production reboot path is external binary/service `awg2-reboot-scheduler`:
|
||||
|
||||
- window from config, not constants;
|
||||
- random point inside `[window_start_utc, window_end_utc)`;
|
||||
- random point inside reboot window (including cross-midnight windows);
|
||||
- `systemctl --no-block reboot` remains;
|
||||
- disabled when `reboot.enabled = false`;
|
||||
- daemon logs planned reboot time.
|
||||
- planned reboot timestamp is persisted in `/run/awg2-harness/reboot.plan`.
|
||||
|
||||
## 17. Swap module
|
||||
|
||||
|
||||
+3
-2
@@ -124,7 +124,7 @@ per-peer ingress filter: src peer_ip -> 2:<id>
|
||||
4. `validate-config` — проверка конфига без изменения системы.
|
||||
5. `apply-firewall` — ручной reconcile AWG2-owned nftables state, если anti-torrent включён.
|
||||
6. `ensure-swap` — идемпотентный setup swap-файла 2 ГБ.
|
||||
7. Встроенный reboot scheduler в `traffic_core` (единый production path, без отдельного runtime-модуля).
|
||||
7. Внешний reboot scheduler `awg2-reboot-scheduler` как отдельный production service.
|
||||
8. Locking, чтобы одновременно не шли два apply/reconcile.
|
||||
9. Docker event watcher.
|
||||
10. Периодический reconciliation loop, потому что Docker events могут быть пропущены.
|
||||
@@ -140,9 +140,10 @@ awg2-harness apply-firewall
|
||||
awg2-harness status
|
||||
awg2-harness ensure-swap
|
||||
awg2-harness validate-config
|
||||
awg2-harness validate-runtime
|
||||
```
|
||||
|
||||
`daemon` — основной production-режим. Он делает initial reconcile, слушает Docker events, периодически проверяет state, интегрирует reboot scheduler и пишет runtime-логи в journald.
|
||||
`daemon` — основной production-режим. Он делает initial reconcile, слушает Docker events, периодически проверяет state и пишет runtime-логи в journald. Планирование reboot выполняется отдельным сервисом `awg2-reboot-scheduler`.
|
||||
|
||||
`apply-limits` — немедленный reconcile traffic limits. Команда должна быть безопасной для повторного запуска.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user