Skip to content

fix(updates): clear superseded install failures; don't let one source… - #506

Merged
JBailes merged 1 commit into
testingfrom
fix/updates-stale-failure
Nov 2, 2026
Merged

JBailes merged 1 commit into
testingfrom
fix/updates-stale-failure

Conversation

@JBailes

@JBailes JBailes commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

… block installs

The WTR Max's Updates page still said "Installing updates failed (2026-11-01T15:36:28Z)" a day later. That install, started from the page, failed because apt.bcachefs.org refused connections; unattended upgrades had since installed kernel 7.2.15-84 and OpenZFS without an error, but the page only reads the last run started from it.

  • A failed install older than /var/lib/apt/periodic/upgrade-stamp, which apt.systemd.daily touches only when unattended-upgrade exits 0, is reported as superseded: the page shows it as history, with when updates last installed. Failed checks are not cleared this way: the unattended refresh runs in apt's default mode, which exits 0 even with an unreachable archive.
  • An install no longer stops when a package source can't be refreshed. One third-party archive being down kept SmoothNAS's own updates from installing. The refresh still runs with Error-Mode=any, its result is logged on its own line, and the install runs regardless. An install that succeeded with a failed refresh says so, and lists the sources.

Tests:

  • Go: the WTR Max log superseded by a newer upgrade-stamp; not superseded by an older or same-second stamp, a missing stamp, a failed check, a successful or unfinished install. The generated install script is run under /bin/sh with stub apt-get/dpkg: a failed refresh still installs and is recorded, a failed install keeps its exit code, a clean run reports nothing. Mutation-checked.
  • Browser: the superseded WTR Max failure shows no error, the same failure without a later success still does (negative control), and a successful install with a failed refresh shows its warning.

… block installs

The WTR Max's Updates page still said "Installing updates failed
(2026-11-01T15:36:28Z)" a day later. That install, started from the
page, failed because apt.bcachefs.org refused connections; unattended
upgrades had since installed kernel 7.2.15-84 and OpenZFS without an
error, but the page only reads the last run started from it.

- A failed install older than /var/lib/apt/periodic/upgrade-stamp, which
  apt.systemd.daily touches only when unattended-upgrade exits 0, is
  reported as superseded: the page shows it as history, with when
  updates last installed. Failed checks are not cleared this way: the
  unattended refresh runs in apt's default mode, which exits 0 even
  with an unreachable archive.
- An install no longer stops when a package source can't be refreshed.
  One third-party archive being down kept SmoothNAS's own updates from
  installing. The refresh still runs with Error-Mode=any, its result is
  logged on its own line, and the install runs regardless. An install
  that succeeded with a failed refresh says so, and lists the sources.

Tests:
- Go: the WTR Max log superseded by a newer upgrade-stamp; not
  superseded by an older or same-second stamp, a missing stamp, a failed
  check, a successful or unfinished install. The generated install
  script is run under /bin/sh with stub apt-get/dpkg: a failed refresh
  still installs and is recorded, a failed install keeps its exit code,
  a clean run reports nothing. Mutation-checked.
- Browser: the superseded WTR Max failure shows no error, the same
  failure without a later success still does (negative control), and a
  successful install with a failed refresh shows its warning.
@JBailes
JBailes merged commit 0fe6fd7 into testing Nov 2, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant