[Bug] SMBIOS auto-config daemon emits constant journal spam in steady state ("already has SMBIOS configuration" every cycle)
What happens
The daemon deployed from SMBIOS_SCRIPT_TEMPLATE (pegaprox/api/nodes.py) logs VM <id> already has SMBIOS configuration on every poll cycle for every already-configured VM.
On a production 9-PVE-host fleet this measured ~2 log lines/sec/node (~35k lines/day fleet-wide on 2026-10-03) — journald carries a steady noise floor where real state changes (new VM, re-created VM, errors) are buried.
Root cause (two parts, both in the template)
needs_smbios_update()logs inside the predicate (the "already has SMBIOS configuration" line) — the log fires while evaluating the check, regardless of the boolean result.- The main loop's recreate-check calls that predicate for every processed VM on every 30s cycle, so every configured VM produces the line once per cycle, forever.
Secondary: log_message() stdout is block-buffered under systemd, masking up to ~13 minutes of lines during incident triage.
Minimal repro (no Proxmox needed)
Render the template exactly like the deploy endpoint (AST-extract value, .format() on the 4 deploy keys, write to a real .py, import, run main() against a tmpdir conf tree). 3 cycles × 3 VMs (new-unstamped / pre-stamped / pending-only, plus a same-ID recreate at cycle 1):
| spam lines | |
|---|---|
unpatched current Testing |
10 (grows every cycle) |
| with fix | 0 |
set_smbios invocations are identical (exactly 2) before and after — only the logging changes.
Proposed fix
- Remove the log side-effect from
needs_smbios_update()(silent steady state). - Restructure the main loop: conf-exists gate first; processed-set membership short-circuits the whole re-check chain; log only on state change.
- Line-buffered stdout (
print(..., flush=True)).
PR follows.
👋 Thanks for opening an issue!
It looks like the issue template was removed (or this was opened outside the templates). We rely on the Bug / Feature template so we can actually act on reports — a description-only issue with the template deleted almost always misses the details we need (version, repro, environment).
Please open a fresh issue using one of the templates (New issue → 🐛 Bug Report or ✨ Feature Request) and fill in the sections. 🐾
This is an automated message — closing for now; reopen with a completed template.
Sorry, our template bot was a bit too eager on this one, reopened it.
Checked it against Testing and you are right: the "already has SMBIOS configuration" line comes from the recreate check, which runs needs_smbios_update() for every processed VM on every cycle, so it never stops. Thanks for the write-up and for #970, I will go through it.
Marcus
Fixed on Testing with fa5a77a, comes with the next release.