From 76035564fadd3196578f317f5428c595ba12dbaa Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Thu, 26 Nov 2026 18:30:24 +0000 Subject: [PATCH] Align VM disk and Alerting Help with QGA and recovery fixes Document two runtime fixes that landed in b60d43f678 (#5196): - VM_DISK_MONITORING.md (and its mirrored in-app Help copy): explain that newer Linux qemu-guest-agent packages (including 10.1.0+ and Rocky/RHEL) disable guest-file-open and guest-file-read by default, that Pulse checks /agent/info to skip /proc/meminfo and backs off disabled-command errors without deferring VM filesystem reads, and that operators should leave guest-file-* disabled rather than widening permissions. - ALERTING.md (and its mirrored in-app Help copy): explain that each destination's recovery notification preserves the severity level from the firing notification it received even after a silent critical-to-warning step-down, and recommend matching external automations on alert ID. Add regression assertions in test_guest_disk_reading_docs.py and test_alerting_outage_help_docs.py binding both sections to runtime code and mirrored Help copies. Contract-Neutral: Documentation and doc-regression test alignment only; no API, schema, or runtime contract change. Change-source: pulse-maintainer --- docs/ALERTING.md | 9 ++++-- docs/VM_DISK_MONITORING.md | 10 ++++++- frontend-modern/public/docs/ALERTING.md | 9 ++++-- .../public/docs/VM_DISK_MONITORING.md | 10 ++++++- .../tests/test_alerting_outage_help_docs.py | 20 +++++++++++++ scripts/tests/test_guest_disk_reading_docs.py | 28 +++++++++++++++++++ 6 files changed, 80 insertions(+), 6 deletions(-) diff --git a/docs/ALERTING.md b/docs/ALERTING.md index 0cc8fac98d..863c724b35 100644 --- a/docs/ALERTING.md +++ b/docs/ALERTING.md @@ -111,8 +111,13 @@ disabled rule or missing reading is not measured recovery. When recovery notifications are enabled, a destination needs a successful firing-delivery record for that same occurrence to receive an eligible recovery -message. Acknowledgement, snooze, schedules and delivery failures can still -prevent it. See [reminders and recovery](CONFIGURATION.md#alert-reminders-and-recovery-notifications). +message. Each destination's recovery notification keeps the severity level from +the firing notification that destination actually received, even if a metric +alert stepped down from critical to warning before clearing. If an external +automation pairs firing and recovery webhooks, match on the alert `ID` rather +than relying on severity alone. Acknowledgement, snooze, schedules and delivery +failures can still prevent recovery delivery. See +[reminders and recovery](CONFIGURATION.md#alert-reminders-and-recovery-notifications). ## Detect an outage of Pulse itself diff --git a/docs/VM_DISK_MONITORING.md b/docs/VM_DISK_MONITORING.md index a2b42dd8c0..1ae7640be0 100644 --- a/docs/VM_DISK_MONITORING.md +++ b/docs/VM_DISK_MONITORING.md @@ -329,6 +329,14 @@ Agent instead. In **Overview → Details**, check **Memory reading** for the source and time. Proxmox can count ARC as used. See [TrueNAS's ARC breakdown](TRUENAS.md#memory-usage-and-arc-cache). +Newer Linux `qemu-guest-agent` packages (including 10.1.0+ as well as Rocky +Linux and RHEL defaults) disable `guest-file-open` and `guest-file-read`. Pulse +reads `/agent/info`, skips `/proc/meminfo` when either command is disabled, and +backs off disabled-command rejections without triggering a guest-agent cooldown +or deferring VM filesystem reads. Leave `guest-file-*` disabled in +`qemu-guest-agent` rather than widening guest allowlists or token permissions +just to keep disk usage working. + Windows has no `/proc/meminfo`. A failure reading that Linux path is not evidence that Windows filesystem collection needs `VM.GuestAgent.FileRead` or that the guest agent is stopped. Keep memory-file access separate from filesystem access; @@ -542,7 +550,7 @@ pass; do not clear or bypass a guest-read pause to test recovery. | **Disk shows “-”** | Read its explanation and observation time. Check the owning host, current VM options, guest-local service and configured API token access. | | **Permission denied** | First check whether this VM is an intended monitoring target. Preserve intentionally restricted access. For intended targets only, review the token and account's effective read privileges, including privilege-separated token ACLs, outside backups or guest incidents. A successful root command would not disprove this error; a denied read does not establish guest or filesystem health. | | **Timeout or backup lock** | Check the existing backup/task timeline and guest workload locally. Defer active guest-agent probes; increasing a timeout is not a contention or thaw repair. | -| **Rocky Linux / RHEL memory missing** | Review `/etc/sysconfig/qemu-ga` inside the guest. File-read restrictions can explain memory collection failure; they do not by themselves prove why filesystem usage is absent. Change the guest's allowlist or restart its agent only through your normal maintenance procedure, outside backups. | +| **Linux `guest-file-*` disabled (including Rocky Linux / RHEL)** | Newer `qemu-guest-agent` packages disable `guest-file-open` and `guest-file-read` by default. Pulse skips `/proc/meminfo` when `/agent/info` reports those commands disabled and backs off disabled-command errors without deferring VM filesystem reads. File-read restrictions can explain missing `/proc/meminfo` readings, not missing filesystem usage, so leave `guest-file-*` disabled unless your normal maintenance policy requires otherwise. | | **Windows service stopped** | Check the QEMU Guest Agent service inside Windows. Schedule any restart outside backups. | ### Passive host preflight diff --git a/frontend-modern/public/docs/ALERTING.md b/frontend-modern/public/docs/ALERTING.md index 0cc8fac98d..863c724b35 100644 --- a/frontend-modern/public/docs/ALERTING.md +++ b/frontend-modern/public/docs/ALERTING.md @@ -111,8 +111,13 @@ disabled rule or missing reading is not measured recovery. When recovery notifications are enabled, a destination needs a successful firing-delivery record for that same occurrence to receive an eligible recovery -message. Acknowledgement, snooze, schedules and delivery failures can still -prevent it. See [reminders and recovery](CONFIGURATION.md#alert-reminders-and-recovery-notifications). +message. Each destination's recovery notification keeps the severity level from +the firing notification that destination actually received, even if a metric +alert stepped down from critical to warning before clearing. If an external +automation pairs firing and recovery webhooks, match on the alert `ID` rather +than relying on severity alone. Acknowledgement, snooze, schedules and delivery +failures can still prevent recovery delivery. See +[reminders and recovery](CONFIGURATION.md#alert-reminders-and-recovery-notifications). ## Detect an outage of Pulse itself diff --git a/frontend-modern/public/docs/VM_DISK_MONITORING.md b/frontend-modern/public/docs/VM_DISK_MONITORING.md index a2b42dd8c0..1ae7640be0 100644 --- a/frontend-modern/public/docs/VM_DISK_MONITORING.md +++ b/frontend-modern/public/docs/VM_DISK_MONITORING.md @@ -329,6 +329,14 @@ Agent instead. In **Overview → Details**, check **Memory reading** for the source and time. Proxmox can count ARC as used. See [TrueNAS's ARC breakdown](TRUENAS.md#memory-usage-and-arc-cache). +Newer Linux `qemu-guest-agent` packages (including 10.1.0+ as well as Rocky +Linux and RHEL defaults) disable `guest-file-open` and `guest-file-read`. Pulse +reads `/agent/info`, skips `/proc/meminfo` when either command is disabled, and +backs off disabled-command rejections without triggering a guest-agent cooldown +or deferring VM filesystem reads. Leave `guest-file-*` disabled in +`qemu-guest-agent` rather than widening guest allowlists or token permissions +just to keep disk usage working. + Windows has no `/proc/meminfo`. A failure reading that Linux path is not evidence that Windows filesystem collection needs `VM.GuestAgent.FileRead` or that the guest agent is stopped. Keep memory-file access separate from filesystem access; @@ -542,7 +550,7 @@ pass; do not clear or bypass a guest-read pause to test recovery. | **Disk shows “-”** | Read its explanation and observation time. Check the owning host, current VM options, guest-local service and configured API token access. | | **Permission denied** | First check whether this VM is an intended monitoring target. Preserve intentionally restricted access. For intended targets only, review the token and account's effective read privileges, including privilege-separated token ACLs, outside backups or guest incidents. A successful root command would not disprove this error; a denied read does not establish guest or filesystem health. | | **Timeout or backup lock** | Check the existing backup/task timeline and guest workload locally. Defer active guest-agent probes; increasing a timeout is not a contention or thaw repair. | -| **Rocky Linux / RHEL memory missing** | Review `/etc/sysconfig/qemu-ga` inside the guest. File-read restrictions can explain memory collection failure; they do not by themselves prove why filesystem usage is absent. Change the guest's allowlist or restart its agent only through your normal maintenance procedure, outside backups. | +| **Linux `guest-file-*` disabled (including Rocky Linux / RHEL)** | Newer `qemu-guest-agent` packages disable `guest-file-open` and `guest-file-read` by default. Pulse skips `/proc/meminfo` when `/agent/info` reports those commands disabled and backs off disabled-command errors without deferring VM filesystem reads. File-read restrictions can explain missing `/proc/meminfo` readings, not missing filesystem usage, so leave `guest-file-*` disabled unless your normal maintenance policy requires otherwise. | | **Windows service stopped** | Check the QEMU Guest Agent service inside Windows. Schedule any restart outside backups. | ### Passive host preflight diff --git a/scripts/tests/test_alerting_outage_help_docs.py b/scripts/tests/test_alerting_outage_help_docs.py index 7df70041a1..e09e32b7ed 100644 --- a/scripts/tests/test_alerting_outage_help_docs.py +++ b/scripts/tests/test_alerting_outage_help_docs.py @@ -120,6 +120,26 @@ class AlertingOutageHelpDocsTest(unittest.TestCase): slugs = {heading_slug(h) for h in headings} self.assertIn(fragment, slugs, f"missing anchor #{fragment} in {doc_path.name}") + def test_recovery_severity_continuity_help_matches_dispatch_receipts(self): + text = DOC.read_text(encoding="utf-8") + section = " ".join( + text.split("## Confirm recovery separately\n", 1)[1] + .split("\n## ", 1)[0] + .split() + ) + dispatch = ( + ROOT / "internal/notifications/notification_dispatch.go" + ).read_text(encoding="utf-8") + self.assertIn("filterResolvedJobsByDeliveryReceipt(", dispatch) + self.assertIn("notifiedLevel", dispatch) + self.assertIn("cloned.Level = notifiedLevel", dispatch) + for phrase in ( + "keeps the severity level from the firing notification that destination actually received", + "stepped down from critical to warning before clearing", + "match on the alert `ID` rather than relying on severity alone", + ): + self.assertIn(phrase, section) + if __name__ == "__main__": unittest.main() diff --git a/scripts/tests/test_guest_disk_reading_docs.py b/scripts/tests/test_guest_disk_reading_docs.py index 12e1f52bad..d31a3f8d91 100644 --- a/scripts/tests/test_guest_disk_reading_docs.py +++ b/scripts/tests/test_guest_disk_reading_docs.py @@ -105,6 +105,34 @@ class GuestDiskReadingDocsTest(unittest.TestCase): self.assertEqual((ROOT / "docs" / name).read_bytes(), (ROOT / "frontend-modern/public/docs" / name).read_bytes()) + def test_disabled_guest_file_help_matches_agent_info_skip_and_backoff(self): + guide = (ROOT / "docs/VM_DISK_MONITORING.md").read_text(encoding="utf-8") + self.assertEqual( + guide.encode("utf-8"), + (ROOT / "frontend-modern/public/docs/VM_DISK_MONITORING.md").read_bytes(), + ) + permissions = " ".join( + guide.split("## ⚙️ Permissions\n", 1)[1].split("\n## ", 1)[0].split() + ) + mem_agent = (ROOT / "internal/monitoring/guest_memory_agent.go").read_text(encoding="utf-8") + metadata = (ROOT / "internal/monitoring/guest_metadata.go").read_text(encoding="utf-8") + self.assertIn("guestFileReadDisabled(", mem_agent) + self.assertIn("IsGuestAgentCommandDisabled(err)", mem_agent) + self.assertIn("fileReadDisabled", metadata) + for phrase in ( + "guest-file-open", + "guest-file-read", + "/agent/info", + "skips `/proc/meminfo` when either command is disabled", + "without triggering a guest-agent cooldown or deferring VM filesystem reads", + "Leave `guest-file-*` disabled in `qemu-guest-agent`", + ): + self.assertIn(phrase, permissions) + self.assertIn( + "File-read restrictions can explain missing `/proc/meminfo` readings, not missing filesystem usage", + guide, + ) + if __name__ == "__main__": unittest.main()