feat(proxmox): choose which stopped guests are reported, per-guest settings, and a setup script #50
No reviewers
Labels
No labels
bug
docs
duplicate
enhancement
help wanted
invalid
nice-to-have
pre-1.0
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/lamplighter!50
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/43-44-proxmox"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #43, closes #44.
#44: sleeping VMs, and which guests get which reports
Source-wide (D3): a new Report stopped guests setting on Proxmox sources:
Per guest (D5/D6, D8-D10): a Rules for single guests section in the source's form. Only guests with a rule get a row; you add one by searching the live guest list in a dropdown picker and remove it with ×. Each rule offers: Ignore, May be stopped (never reported stopped, paused, or hibernated; io-error and HA errors still report), Skip backup check (left out of backup coverage only), and Severity.
lamplighter-ignoretag shows as a checked, locked Ignore, and the severity select says what the tag sets. A severity set here beats a severity tag.settings.guests, keyed by vmid, with a name snapshot). Guests with only Proxmox tags are listed in one line under the picker. Guests gone from Proxmox keep their rule, marked Not found in Proxmox, until removed by hand. If the list can't load, stored settings are shown and saved back unchanged.Hibernation (F1):
qmsuspend/vzsuspendnow count as stop tasks ("root@pam hibernated it …"), and a config lockedsuspendedcounts as stopped on purpose, so a hibernated VM is no longer blamed on a crash.No new env vars or dependencies. New stored settings are
stopped_guestsandguestson Proxmox sources.#43: setup script
The setup guide now starts with a single script to paste on a node as root. It creates the read-only user and token, then prints the token ID, the secret, and the cluster's CA certificate. Update and syslog access are opt-in (
UPDATES=yes/SYSLOG=yesat the top). The commands it runs are still listed for doing it by hand. A test runs it against a fakepveum, andpveum ... --output-format jsongives the secret.Screenshots (example data, fake Proxmox API)
Guest rules, desktop: two sleeping Fortysix VMs set to May be stopped, nextcloud set to Serious, k3s nodes skip backup, one guest not found in Proxmox, and the tagged guests listed under the picker:
Adding a rule: typing in the picker, desktop and 390px:
Guest rules, 390px:
Report stopped guests, desktop and 390px:
Setup guide with the script, desktop and 390px:
Checks
mix precommitis clean (840 tests). New tests cover policy merging (tag and setting), may-stop and its skipped fetches, the three stopped-guests modes,stop_kindincluding the hibernation lock, the setting normalizer and its round trip (clearing the last guest really clears it), and the form: load, the search picker (filtering, adding, Escape), save, error, removal, and no token sent to a changed URL.