Skip to content

fix: separate UI customisation from pinning, stop silent config loss - #4

Merged
catinspace-au merged 1 commit into
mainfrom
fix/decouple-ui-and-key-loss
Jul 26, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/decouple-ui-and-key-loss

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

Every one of these was found by remediating a real host against these scripts. Each either did nothing while looking like it worked, or quietly discarded something.

Pinning and nag suppression were welded together

The APT hook gated on the pinning file existing:

[ -f "/etc/apt/preferences.d/proxmox-conservative" ] || exit 0

So a host that wanted latest packages got the subscription warnings back with no way to say otherwise. They are independent concerns -- new ui-only / ui-disable commands, and the hook now gates on the customisation's own marker.

Verified on nested PVE 9.2.5: ui-only installs with 0 pinning entries; deleting the served JS and script tag then running apt --reinstall pve-manager restored both with APT_EXIT=0.

The served JS also lives in a pve-manager-owned directory and is deleted by package updates. A master copy outside dpkg's control means the hook restores it rather than only logging that it is gone.

Cleanup could silently drop tuning

It classified superseded sysctl files by generation, not content. Run against the live host:

[KEEP] /etc/sysctl.d/99-proxmox-tweaks.conf
       overrides 98-proxmox-optimize.conf, but sets 5 key(s) it does not:
         fs.inotify.max_user_instances
         net.ipv4.tcp_keepalive_intvl
         net.ipv4.tcp_keepalive_probes
         vm.dirty_expire_centisecs
         vm.dirty_writeback_centisecs

All five would have gone. A backup makes that recoverable, not safe.

Drive addressing reverted to Derek's original approach

His incident scripts addressed drives by /dev/disk/by-id and matched the udev rule on ID_MODEL. Both were better than what this generated:

  • Kernel names are not stable across reboots, so a boot-time unit keyed on sdX can assert SCT ERC against the wrong disk
  • A per-serial udev rule leaves a replacement drive of the same model unprotected until someone remembers to re-run this -- fitting a replacement disk is exactly when nobody is thinking about kernel timeouts

SATA link power management on VM disks

Found live on all four members of the pool carrying every VM (med_power_with_dipm). ALPM parks the SATA link between commands and adds wake latency to every I/O, working directly against the bounded retry times disk-errors configures.

The sysfs policy does not survive a reboot, so setting it once at install time was not enough -- it is now reasserted from the generated boot script, ZFS-aware.

Baseline is now a superset

optimize carries the keepalive probe/interval pair and the inotify instance limit. Deliberately not the dirty writeback intervals: holding dirty pages longer is defensible with a UPS and reckless without, so it stays an operator decision rather than a default.

Tests

121 checks, no Proxmox / root / network needed. Cleanup gains coverage for the key-loss guard, driven by the real content of the two files that exposed it.

Not verified

  • Cluster coordination -- still only run on a standalone node
  • Browser behaviour of the override -- parses under node, every hook guarded, but nothing proves a warning is relabelled on screen

Found by remediating a real host against these scripts. Each of these either
did nothing when it looked like it worked, or quietly discarded something.

- update-policy: pinning and the UI customisation are now independent. The APT
  hook gated on the pinning file, so a host that wanted latest packages got the
  subscription warnings back with no way to say otherwise. New ui-only and
  ui-disable commands; the hook gates on the customisation's own marker
- update-policy: the served JS lives in a pve-manager-owned directory and is
  deleted by package updates. A master copy outside dpkg's control means the
  hook can restore it rather than only logging that it is missing

- cleanup: refuse to remove a superseded sysctl file that still sets keys its
  replacement does not. Classification was by generation, not content, so a
  file could be removed along with tuning nothing else carried. On a live host
  that was five keys -- dirty writeback intervals, keepalive probe tuning, an
  inotify limit. A backup makes that recoverable, not safe

- disk-errors: address drives by /dev/disk/by-id and match the udev rule on
  ID_MODEL. Reverted to the approach in Derek's original incident scripts,
  which was better than the generated one: kernel names are not stable across
  reboots, so a boot-time unit keyed on sdX can assert settings against the
  wrong disk, and a per-serial udev rule leaves a replacement drive of the same
  model unprotected until someone re-runs this

- power-management: hold SATA controllers backing a ZFS pool at
  max_performance, and reassert it from the boot script. Link power management
  parks the SATA link between commands and adds wake latency to every I/O,
  which works against the bounded retry times disk-errors configures. Found
  live on all four members of the pool carrying every VM. The sysfs policy does
  not survive a reboot, so setting it once at install time was not enough

- optimize: carry the keepalive probe/interval pair and the inotify instance
  limit, so the baseline is a superset of what it replaces. Deliberately NOT
  the dirty writeback intervals: holding dirty pages longer is a defensible
  choice with a UPS and a reckless one without, so it stays an operator
  decision rather than a default

- tests: 121 checks. Cleanup gains coverage for the key-loss guard, driven by
  the real content of the two files that exposed it
@catinspace-au
catinspace-au merged commit c85901f into main Jul 26, 2026
6 checks passed
@catinspace-au
catinspace-au deleted the fix/decouple-ui-and-key-loss branch July 26, 2026 10:38
github-actions Bot added a commit that referenced this pull request Jul 26, 2026
## [2.6.2](v2.6.1...v2.6.2) (2026-07-26)

### Bug Fixes

* separate UI customisation from pinning, stop silent config loss ([#4](#4)) ([c85901f](c85901f))
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.6.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant