Files
securityonion/salt/common/tools/sbin
Mike Reeves 40c02b3149 Make so-kernel-upgrade populate the kernel repo and fail loudly
Three stages of the UEK8 path fail silently, and the script only handled
the last one:

1. Populate. so-repo-sync runs before the highstate deploys the
   [securityonionkernel] section into repodownload.conf, so the first
   kernel-aware soup skips the kernel sync. kernelrepo_init_empty then
   seeds valid-but-empty repodata, leaving an enabled repo with zero
   packages. dnf resolves it happily and installs nothing, no error.

2. Install. `dnf install kernel-uek` on a UEK7 node sees kernel-uek 5.15
   already installed, prints "Nothing to do" and exits 0 -- so the script
   sailed past the install and died later with a misleading grubby error.

3. Boot. Already handled: grubby only auto-promotes within the running
   kernel's flavor lineage, so 5.x -> 6.x UEK never promotes on its own.

Add ensure_kernel_repo(), which verifies the repo is enabled (necessary
because skip_if_unavailable=1 hides a broken repo) and that it can serve a
6.x kernel-uek. When it cannot, a manager runs so-repo-sync to populate
/nsm/kernelrepo and re-checks; a minion cannot fix it and exits non-zero
pointing the admin at the manager. Airgap managers bail, since their repo
comes from the ISO rather than a sync.

Install the explicit UEK8 NEVRA instead of the bare package name so the
"Nothing to do" exit-0 case cannot mask a no-op, and pin the repoquery to
securityonionkernel so a UEK7 kernel-uek in the main repo is never picked.

Still idempotent and still never reboots.
2026-07-09 14:21:08 -04:00
..
2024-10-01 08:33:37 -04:00
2026-03-06 15:45:36 -05:00
2026-02-27 13:09:55 -05:00
2026-06-09 23:19:26 -05:00
2025-05-14 09:23:35 -04:00
2022-09-07 09:06:25 -04:00
2026-05-15 11:36:46 -04:00
2021-02-26 18:06:07 -05:00
2026-03-06 15:45:36 -05:00
2022-09-07 09:06:25 -04:00
2026-03-06 15:45:36 -05:00
2022-09-07 09:06:25 -04:00
2022-09-07 09:06:25 -04:00
2021-04-02 14:49:22 -04:00
2026-03-06 15:45:36 -05:00
2023-02-22 10:42:45 -05:00
2022-09-07 09:06:25 -04:00
2022-09-13 11:48:25 -04:00
2022-09-07 09:06:25 -04:00
2023-09-05 12:46:49 -04:00