Files
==TIM.©.B == 00974293c3 fix: VM memory alerts without guest data and helper-script re-pin (PVE 9.3.1) (#53)
* fix(health): do not alert on host-side RSS of VMs without guest memory data

For a running VM without balloon statistics and without a running guest agent,
/cluster/resources reports the QEMU process size as "mem". That value sits near
100% for a healthy VM (measured on PVE 9.3.1: 99.95% for a VM with balloon off
and the agent not running) and produced a permanent CRITICAL memory alert.

For running VMs above the memory threshold, pman now reads qemu/<id>/status/current.
Without ballooninfo and freemem the memory value is reported as n/a with an explicit
note (text, --health --json "mem_note"/"mem_host"), no alert is raised and an alert
raised earlier is resolved with a reason instead of lingering.

Real problems stay visible: guest-reported memory, containers, a failed or unreadable
status lookup and HEALTH_MEM_HOST_ALERT=1 (opt-in to the old host-side behaviour) all
still alert. VMs below the threshold cause no extra queries.

Adds tests/test_health_mem.sh (12 cases, 6 of which fail on the previous version)
and runs it in CI.

* fix(maintenance): re-pin helper-script sources so the helper tools are not blocked

The pinned blobs for update-lxcs, fstrim, clean-lxcs and core.func no longer matched
upstream main. The start preflight requires both the tool and core.func to match, so
all eight helper tools were blocked with "upstream changed".

Re-pin to community-scripts/ProxmoxVE 2450ee9 and community-scripts/core e974fca
(module 1.0.6). Reviewed diff against the previous pin: updater and cleaner report
failed containers and exit with the apt code, fstrim reads the root volume from the CT
config and skips containers that do not start, core.func supports PVE 9.0-9.3, bounds
pveam calls and handles signals. No new downloads or network access were added; the
only eval runs the shell's own trap output.

All nine sources hash-verified against the pins. PVE 9.3.1: none of the eight tools
calls pve_check/require_pve_host, so the old "9.0-9.2" gate did not apply to them either.

* test(maintenance): offline regression tests for the LXC updater and launcher failures

- test_lxc_updater.py: runs the pinned update-lxcs.sh against stubbed pct/whiptail with
  simulated container IDs (no real host, /usr/sbin is not on PATH). Covers exclusion of
  all/none/some, exact ID matching (10/100/1000), stopped and template containers, ESC,
  cancel and "No" aborting without touching a container, failure reporting and the apt
  exit code. A test ties the fixture to the pin in community.TOOLS.
- lxc_updater_harness.py: fail-closed dry-run (whiptail shim answers with the script's
  own menu, pct shim forwards only list/status/config, process-group kill on timeout,
  verdict from the call log instead of terminal scraping).
- test_community_runtime.py: exit codes, syntax errors, signals, interrupt cleanup,
  tampered and oversized downloads, network timeout, environment isolation.

* docs: document memory alert handling and the helper-script re-pin

README (EN/DE), CONTRIBUTING, health page and CHANGELOG describe the n/a handling of
VM memory without guest data, HEALTH_MEM_HOST_ALERT, the new test suites and the
maintenance module 1.0.6 re-pin.

* test(maintenance): keep the upstream updater fixture out of the CI shellcheck glob

The CI shellcheck step collects every *.sh up to depth 4, which would have picked up the
vendored third-party update-lxcs.sh. Store it as update-lxcs.upstream; the pin test still
verifies its blob hash.

* test(maintenance): drop the command-line entry point of the updater harness

CodeQL flagged the user-supplied --real-pct and script path (py/command-line-injection,
py/path-injection). The harness is only imported by the tests and runs against their
stubbed pct, so the entry point is removed instead of suppressing the alert.

* ci: run the maintenance matrix on ubuntu-24.04

ubuntu-latest now resolves to 26.04, for which actions/setup-python has no Python 3.9
build, so the 3.9 matrix entry failed before running any test (and cancelled 3.13).

* build(site): update Astro to 7.4.13 (GHSA-r3h5-4585-7x3w)

npm audit fix; the site builds with Node 24 and the CI content checks pass.
2026-11-29 00:26:56 +01:00

122 lines
4.6 KiB
JSON

{
"format": 1,
"reviewed_at": "2026-11-28",
"notice": "Wartungsadapter sind eigenständig. Ausgewählte Community-Host-Tools können im Menü ausdrücklich gestartet werden; der aktuelle Upstream und der geprüfte Git-Blob werden unmittelbar davor geprüft. Der optionale Telemetrie-Baustein wird nicht geladen.",
"adapters": {
"storage": {
"origin": "own",
"reference": null,
"modifications": "Independent implementation; no upstream code copied"
},
"smart": {
"origin": "own",
"reference": "tools/pve/disk-health.sh",
"modifications": "Independent implementation; no upstream code copied"
},
"maintenance": {
"origin": "own",
"reference": "tools/pve/kernel-clean.sh",
"modifications": "Independent implementation; no upstream code copied"
},
"volumes": {
"origin": "own",
"reference": null,
"modifications": "Independent implementation; no upstream code copied"
},
"filesystems": {
"origin": "own",
"reference": null,
"modifications": "Independent implementation; no upstream code copied"
},
"scan": {
"origin": "own",
"reference": null,
"modifications": "Independent implementation; no upstream code copied"
},
"trim": {
"origin": "own",
"reference": "tools/pve/fstrim.sh",
"modifications": "Independent implementation; no upstream code copied"
},
"cache-clean": {
"origin": "own",
"reference": "tools/pve/clean-lxcs.sh",
"modifications": "Independent implementation; no upstream code copied"
}
},
"references": [
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/fstrim.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "e80c958c4afe2759829fe0da4fc9bff9c2d55421",
"license": "MIT",
"role": "verified launchable helper; only starts after live hash verification"
},
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/disk-health.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "fa12746aedce484fe760bcccf4d1bcb3de58501b",
"license": "MIT",
"role": "verified launchable helper; only starts after live hash verification"
},
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/clean-lxcs.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "8607380243a29b43cc586c5dd6b7a582fb4b4945",
"license": "MIT",
"role": "verified launchable helper; only starts after live hash verification"
},
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/kernel-clean.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "98351a487f14ed77df99f8945a9f45bf0b1870c0",
"license": "MIT",
"role": "verified launchable helper; only starts after live hash verification"
},
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/clean-orphaned-lvm.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "18548a37a27a74a0bd7510b58efc0205618b2f64",
"license": "MIT",
"role": "verified launchable helper; interactive LVM deletion"
},
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/host-backup.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "4a579cd1cb14dbe0623608bd238ea92e3bc84b07",
"license": "MIT",
"role": "verified launchable helper; writes a user-selected archive"
},
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/scaling-governor.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "49ab7189d171b5e982f8a9c46405c614d9fe4f1a",
"license": "MIT",
"role": "verified launchable helper; changes host CPU policy"
},
{
"repository": "community-scripts/ProxmoxVE",
"path": "tools/pve/update-lxcs.sh",
"reviewed_commit": "2450ee94b335ffaba261e6e09d4b290acba92fb0",
"blob_sha": "085be654751fd97487c1e73c16835ae38c15cebe",
"license": "MIT",
"role": "verified launchable helper; updates selected containers"
},
{
"repository": "community-scripts/core",
"path": "core/core.func",
"reviewed_commit": "e974fcad871e1ccf4a78ec8c44f32d0c4a409058",
"blob_sha": "9fd7babf970113ce2f780272247fbeb448a85205",
"license": "MIT",
"role": "pinned runtime dependency; optional telemetry API intentionally omitted"
}
]
}