mirror of
https://github.com/TimInTech/proxmox-manager.git
synced 2026-12-05 16:04:57 +03:00
* 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.
43 lines
1.6 KiB
Markdown
43 lines
1.6 KiB
Markdown
# Contributing Guide
|
|
|
|
Thanks for your interest in improving `proxmox-manager`!
|
|
|
|
## How to Contribute
|
|
|
|
1. **Discuss first**
|
|
Open an issue before starting major work so we can align on scope, approach,
|
|
and ownership.
|
|
|
|
2. **Fork and branch**
|
|
Create a topic branch from `main`. Use descriptive branch names such as
|
|
`feature/json-output` or `fix/spice-port`.
|
|
|
|
3. **Style and tooling**
|
|
- Shell scripts must pass `shellcheck` and `shfmt -w -i 2 -ci -sr`.
|
|
- Markdown should be wrapped at 100 columns when practical.
|
|
- Follow the `.editorconfig` settings.
|
|
|
|
4. **Testing**
|
|
- Exercise the script on a Proxmox test host or mock environment when
|
|
possible.
|
|
- Run `bash tests/run.sh`, `bash tests/test_inventory.sh`,
|
|
`bash tests/test_spice.sh`, `bash tests/test_health_mem.sh` and
|
|
`python3 -B -m unittest discover -s tests/maintenance -v` locally.
|
|
- Add regression coverage to the existing test harnesses for behavior changes.
|
|
- Document manual testing steps in the pull request description.
|
|
|
|
5. **Commit standards**
|
|
- Keep commits focused and atomic.
|
|
- Reference GitHub issues using `Fixes #123` when applicable.
|
|
|
|
6. **Pull Request checklist**
|
|
- [ ] `./install_dependencies.sh` ran successfully (if relevant).
|
|
- [ ] `shellcheck` and `shfmt` pass locally.
|
|
- [ ] Documentation updated for behavior changes (`README.md`, `docs/`).
|
|
- [ ] Security scans run locally if you touched sensitive areas; do not commit generated reports.
|
|
|
|
## Releasing
|
|
|
|
Tag `vX.Y.Z` on `main` when a new version is ready. Releases are published
|
|
from `main`; there is no automated release-drafter workflow in this repo.
|