Первый живой запуск после 38c41f4 (15.11.2026) упал: под ProtectSystem=strict реестр хаба только для чтения, а открытие реестра пишет (шаг схемы), и хаб не мог назвать канарейку изнутри юнита. ReadWritePaths юнита дополнен /etc/vpnbot-node-manager (метка xray-canary в inventory.sqlite3) и /var/lib/vpnbot-node-manager (круги транспорта в manager.sqlite3) — как у таймеров самого хаба (fleet-converge).
Тест: HubCanaryTests.test_the_unit_lets_the_promoter_ask_the_hub — каталог HUB_INVENTORY и каталог manager.sqlite3 открыты юниту на запись.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
917 B
Desktop File
28 lines
917 B
Desktop File
[Unit]
|
|
Description=Pilot and promote a VPnBot Xray candidate
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
ConditionPathExists=/etc/vpnbot-xray-release-promoter.env
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=root
|
|
Group=root
|
|
EnvironmentFile=/etc/vpnbot-xray-release-promoter.env
|
|
Environment=PYTHONDONTWRITEBYTECODE=1
|
|
ExecStart=/usr/local/libexec/vpnbot-xray-release-promoter/pilot_and_promote.py
|
|
UMask=0077
|
|
PrivateTmp=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=read-only
|
|
# The canary is asked from the hub's registry on every run (manage_node.py
|
|
# xray-canary --apply): it may move the mark in inventory.sqlite3 and reads
|
|
# the transport circuits in manager.sqlite3, as the hub's own timers do.
|
|
ReadWritePaths=/var/lib/vpnbot-xray-release-promoter /etc/vpnbot-node-manager /var/lib/vpnbot-node-manager
|
|
NoNewPrivileges=yes
|
|
LockPersonality=yes
|
|
MemoryDenyWriteExecute=yes
|
|
RestrictSUIDSGID=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|