diff --git a/ADR.md b/ADR.md index 303616c..24a0cbb 100644 --- a/ADR.md +++ b/ADR.md @@ -606,18 +606,18 @@ 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. A cron job updates the package lists, so a release -newer than its last run is not seen until the next one. +makes `/usr` and `/var/lib/dpkg` read-only. Ubuntu's `apt-daily` timer updates the package lists +twice a day, 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 not wait for it. The helper: - finishes an interrupted dpkg run with `dpkg --configure -a`; -- 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; +- 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 `apt-daily` or `unattended-upgrades` 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. 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. +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 `apt-daily` timer. 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 3713195..bf9d2a1 100644 --- a/debian-package/debian/changelog +++ b/debian-package/debian/changelog @@ -1,3 +1,13 @@ +vpn-router (0.19.1-3) unstable; urgency=medium + + update: ADR-24 names Ubuntu's apt-daily timer, not a cron job, as what updates the package lists. + + * ADR-24 says that Ubuntu's apt-daily timer updates the package lists + twice a day, and that apt-daily or unattended-upgrades may hold the + dpkg lock the upgrade waits for. + + -- Slawomir Koszewski Tue, 27 Oct 2026 10:00:00 +0100 + vpn-router (0.19.1-2) unstable; urgency=medium update: ADR-24 says that the Router Manager checks for updates on demand.