Commit Graph
6 Commits
Author SHA1 Message Date
==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
TimInTech 34045b8784 fix: prepare v2.14.1 with SPICE, inventory and terminal fixes 2026-11-08 19:15:49 +01:00
==TIM.©.B ==andClaude Sonnet 5.5 c9168107c8 feat(maintenance): Sprachwahl Deutsch/Englisch bei der Installation (gestapelt auf #50) (#51)
* feat(maintenance): German/English display language, chosen at installation

German source text is the catalog key and English comes from catalog_en.py, so a
missing entry falls back to German. The installer asks 'Language / Sprache' in a
terminal or takes --lang de|en and stores the choice in /etc/pman/language;
PMAN_LANG overrides it per run. Persisted source-check statuses stay language
neutral and are translated on display. Tests check catalog completeness,
placeholder parity, the installer flow (including the interactive prompt) and
English golden snapshots. Module version 1.0.5.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(maintenance): parenthesise the 'last checked' fallback in the source report

The stored check time was concatenated before the 'or' fallback, so an empty
state raised TypeError instead of showing 'not checked yet'. Regression test
covers both languages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(installer): avoid A && B || C in the language handling (SC2015)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(installer): validate the language file directory before install, rollback and removal

A staged uninstall followed an etc/pman symlink and deleted a language file
outside --destdir. The directory chain is now checked with the other
destinations before any operation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 01:07:21 +01:00
==TIM.©.B ==andClaude Sonnet 5.5 3c971f8a0a feat(maintenance): Helper-Scripts-Menü mit Herkunft, Gefahrenstufen und Bestätigungsschirm (#50)
* fix(maintenance): re-pin Helper-Scripts to reviewed 2026-11-04 state

Upstream changed core.func and four tools; all eight launchers were blocked.
Reviewed the diffs (clear fallback, probe cache, non-fatal logging); no new
network access or code paths. Pins and blob SHAs updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* refactor(maintenance): add Helper-Scripts identity, groups, hazard levels and verified-launch API

Group and label the eight launchers, add SourceBlocked with file and revision
details, stored_status() for a network-free menu header, and prepare_launch /
run_launch so the verified bytes can be previewed and then executed unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* feat(maintenance): clearer Helper-Scripts menu with provenance, hazard tags and confirmation

Pure render layer (view.py) feeds curses and the golden snapshot tests.
Menu names the source, licence and website, groups tools by intent, shows
text hazard tags and the stored source check. Confirmation shows URL, command
and root-on-host notice; v previews the verified script. NO_COLOR, ASCII
glyphs and optional OSC 8 links; badge colours are fixed pairs >= 4.5:1.
Module version 1.0.4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(maintenance): derive the bumped version in the installer rollback test

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(maintenance): judge the stored source check against the current manifest

A re-pin after the last daily check must not leave the old verdict standing:
compare the observed blob with the reviewed pin instead of the stored status text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: describe the Helper-Scripts menu, hazard levels, confirmation and display options

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(demo): record the new Helper-Scripts flow and close an anonymizer gap

The demo now shows the grouped menu, the confirmation screen and the source
preview for Kernel Clean, then cancels without starting anything.

The stream anonymizer now holds back a partial 'Node:' header line until it is
complete; a read ending between the colour codes leaked the real node name into
the recording. The privacy scan strips control sequences before matching (it
missed the leak before) and also checks the confirmation screen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(ci): commit demo markers for verification and de-flake the cancel PTY test

verify_demo reads the confirmation time recorded by the driver, so the file
belongs with the other demo artifacts. The PTY cancel test sent its 'q' in the
same instant the UI flushes queued input and could lose it on a busy runner;
it now repeats the key like a user would.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(maintenance): qualify the Disk Health hazard level

Disk Health can install smartmontools/nvme-cli on request, so its level text no
longer promises that nothing changes: 'LESEN – Diagnose; installiert nur auf
Nachfrage Pakete'. Docs and golden snapshots follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* feat(maintenance): badges in the maintenance menu and a calmer Helper-Scripts overview

Changing actions get [ÄNDERT] and the Helper-Scripts entry gets a blue [FREMD]
badge (white on xterm-256 25, 6.45:1), aligned in a column; the overview lists
name, licence, URL and groups once instead of repeating them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(demo): re-record with the badged maintenance menu

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 00:08:17 +01:00
==TIM.©.B == b39859d66a fix: harden SMART scan, site links and CI gates (#48)
- maintenance: a disk whose smartctl output is not JSON no longer aborts
  the whole report; the device is named as unreadable and the remaining
  disks plus their state file keep working (regression test added).
- site: repository-relative file links (CHANGELOG.md and friends) point
  at the GitHub blob, headings get GitHub-style anchors so the upstream
  #-installation, #health-monitoring--alerts and
  #relaying-through-an-external-smtp-provider links resolve again.
- pages workflow: rebuild on README/README.de.md changes because the
  guide reads them at build time; pin all actions to commit SHAs.
- ci: new documentation-site job builds Astro, verifies the five routes,
  key commands and anchors, and runs npm audit on pull requests.
- readme: keep HEALTH_MAIL_TO commented out in the alert quick start so
  --test-notify proves ntfy instead of failing on a missing MTA.
2026-11-03 01:25:40 +01:00
==TIM.©.B ==andTim Baumann c04e5752e7 feat: optional storage and maintenance TUI (#44)
* feat: add optional storage and maintenance module

* fix: make maintenance TUI reports usable

* feat: launch verified community PVE tools

* feat: polish optional maintenance TUI

---------

Co-authored-by: Tim Baumann <tim@timintech.com>
2026-10-28 05:04:14 +01:00