From 959ca0cd32cdfcb4c2a5b57fb56449974e7a56c5 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sun, 25 Oct 2026 19:02:19 +0100 Subject: [PATCH] update: ADR-24 says that the Router Manager checks for updates on demand. --- ADR.md | 6 +++--- debian-package/debian/changelog | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ADR.md b/ADR.md index 9f125f0..303616c 100644 --- a/ADR.md +++ b/ADR.md @@ -606,8 +606,8 @@ upgrade restarts the process that starts it: the manager's postinst restarts `vpn-router-manager.service`, and the router's restarts `vpn-router-web` and `vpn-router-setup`. A child of the manager would be stopped with the manager's cgroup in the middle of dpkg, leaving packages half configured, and the manager's unit cannot run apt at all, since `ProtectSystem=strict` -makes `/usr` and `/var/lib/dpkg` read-only. The package lists are updated by a cron job, not by the -manager. +makes `/usr` and `/var/lib/dpkg` read-only. A cron job updates the package lists, so a release +newer than its last run is not seen until the next one. Decision: The manager starts the helper `/usr/lib/vpn-router-manager/upgrade` with `systemd-run` as the transient unit `vpn-router-manager-upgrade`, of its own cgroup and without a sandbox, and does @@ -617,7 +617,7 @@ not wait for it. The helper: - runs `apt-get install --only-upgrade` of the two packages, non-interactive, keeping changed configuration files, with `needrestart` suspended, and waiting for the dpkg lock that the cron job may hold; - records the state and the result in `/var/lib/vpn-router-manager/upgrade.json`, replaced by a rename, and the output in `upgrade.log`. -A restarted manager reads them again. A state of running without an active unit is shown as interrupted. The manager reboots the router the same way, as a transient timer `vpn-router-manager-reboot` 5 seconds later, so the answer reaches the browser first. Only members of `admins`, as the router's `/account` answers, may start either. +A restarted manager reads them again. A state of running without an active unit is shown as interrupted. The manager reboots the router the same way, as a transient timer `vpn-router-manager-reboot` 5 seconds later, so the answer reaches the browser first. It checks for updates the same way too: Check update runs `apt-get update` in the transient unit `vpn-router-manager-check`, which touches apt's update stamp when it succeeds, so an admin need not wait for the cron job. Only members of `admins`, as the router's `/account` answers, may start any of them. Consequences: The fixed unit name allows one upgrade at a time. The page loses the manager and the router's web service for a while during an upgrade and reads again until they answer. Sessions diff --git a/debian-package/debian/changelog b/debian-package/debian/changelog index 0fcdbcc..3713195 100644 --- a/debian-package/debian/changelog +++ b/debian-package/debian/changelog @@ -1,3 +1,12 @@ +vpn-router (0.19.1-2) unstable; urgency=medium + + update: ADR-24 says that the Router Manager checks for updates on demand. + + * ADR-24 describes Check update of the Router Manager, which updates + apt's package lists in the transient unit vpn-router-manager-check. + + -- Slawomir Koszewski Tue, 27 Oct 2026 09:00:00 +0100 + vpn-router (0.19.1-1) unstable; urgency=medium fix: /metrics/history gives the availability of each site-to-site connection as the percentage of time it was up in slots of the view.