Keep OPNsense telemetry when the script worker cannot start and build it for FreeBSD 14.1

A worker linked on the FreeBSD 15 test guest needs FBSD_1.9 and does not load on
OPNsense 24.7; the agent then retried the job session every 30 s and never sent a
heartbeat or inventory. The agent now pauses script capabilities for an hour and
reconnects without them. tools/dev_opnsense_worker.py links the worker against the
official FreeBSD 14.1 pkgbase libraries. The installer checks that the worker loads
before binding it and reports success only after a heartbeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 12:17:34 +01:00
co-authored by Claude Opus 5.5
parent 19163a2efe
commit 93429e4394
8 changed files with 216 additions and 15 deletions
+3 -2
View File
@@ -2,7 +2,8 @@
"""Build the OPNsense agent bundle and place it on the dev server for the HTTPS installer.
The bundle is `agent.pyz`, `collect.pyz`, the rc.d script and optionally the native
script worker `rmm-opnsense-jobs` (FreeBSD amd64, built natively in the test guest).
script worker `rmm-opnsense-jobs` (FreeBSD amd64, built with tools/dev_opnsense_worker.py
against FreeBSD 14.1 so that it also loads on OPNsense 24.x).
It lands in `devstate/mvp-releases/config/opnsense/` next to the Linux bootstrap
configuration and is served only against a valid one-time enrollment code.
"""
@@ -68,7 +69,7 @@ def main():
worker = parser.add_mutually_exclusive_group()
worker.add_argument('--worker', type=Path, help='Native rmm-opnsense-jobs (FreeBSD amd64) to include')
worker.add_argument('--worker-from-guest', action='store_true',
help='Take the installed rmm-opnsense-jobs from the OPNsense test guest')
help='Take the installed rmm-opnsense-jobs from the OPNsense test guest (loads only on the guest release)')
parser.add_argument('--prepare-only', type=Path, metavar='DIR', help='Write the bundle locally, do not upload')
args = parser.parse_args()
version = re.search(r"^VERSION = '([A-Za-z0-9._-]+)'$", (ROOT / 'deploy/opnsense/agent.py').read_text(), re.M)[1]