Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Model cold PBS collection without an orphaned live-cache clock

pulse-triage[bot]8835e7a1f98b
diff --git a/internal/monitoring/pbs_backup_budget_test.go b/internal/monitoring/pbs_backup_budget_test.go
index 71ee16e561..5298701be9 100644
--- a/internal/monitoring/pbs_backup_budget_test.go
+++ b/internal/monitoring/pbs_backup_budget_test.go
@@ -151,7 +151,16 @@ func exercisePBSBudgetAcceptedListings(t *testing.T) {
}
f.m.mu.RUnlock()
if cold {
+ // A replacement monitor has durable history, but neither
+ // live snapshots nor their in-memory fetch timestamps.
+ // Orphan timestamps alone are not a reusable snapshot cache.
f.m.state.UpdatePBSBackups("pbs-main", nil)
+ f.m.mu.Lock()
+ delete(f.m.pbsBackupCacheTime, "pbs-main")
+ f.m.mu.Unlock()
+ for key := range cache {
+ cache[key] = time.Time{}
+ }
}
f.at.Add(15 * 60)
f.phase.Store(1)