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.

Show partial backup history as attention, not unknown

rcourtmand6ab401ece9c
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 0e1a9dfa3b..93908cea08 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -4493,6 +4493,10 @@ authorized provider history, plus verification when the provider declares it
expected. Stale, failed, partial, or unverified evidence is attention;
unprotected requires complete evidence of no qualifying backup; unavailable
identity, history, collection, or permission evidence fails to unknown.
+Partial history whose access is unknown is partial, not unavailable: PVE and
+PBS report an ordinary failed read of one storage or datastore that way, and
+the unknown access describes only the unread part. It stays attention, so one
+unreadable target cannot turn every subject with a readable backup unknown.
Snapshots remain distinct and never prove independent recovery by themselves.
The posture `explanation` is user-facing copy (the Coverage row tooltip and
expansion render it verbatim), so it is written in plain words rather than the
diff --git a/internal/monitoring/pbs_poll_posture_test.go b/internal/monitoring/pbs_poll_posture_test.go
index 9cdcc553ed..f89b1a5025 100644
--- a/internal/monitoring/pbs_poll_posture_test.go
+++ b/internal/monitoring/pbs_poll_posture_test.go
@@ -261,7 +261,7 @@ func TestPBSOrdinaryPollSnapshotFailuresDoNotClaimCompleteHistory(t *testing.T)
permissions operationaltrust.EvidencePermissions
state recovery.ProtectionState
}{
- {"transient", 2, operationaltrust.EvidencePermissionsUnknown, recovery.ProtectionStateUnknown},
+ {"transient", 2, operationaltrust.EvidencePermissionsUnknown, recovery.ProtectionStateAttention},
{"denied", 3, operationaltrust.EvidencePermissionsPartial, recovery.ProtectionStateAttention},
} {
t.Run(tc.name, func(t *testing.T) {
diff --git a/internal/recovery/posture.go b/internal/recovery/posture.go
index 34f3596ab6..22ed6218ba 100644
--- a/internal/recovery/posture.go
+++ b/internal/recovery/posture.go
@@ -469,8 +469,14 @@ func DeriveProtectionPostureAt(
case operationaltrust.EvidencePermissionsSufficient:
case operationaltrust.EvidencePermissionsPartial:
hasPartial = true
- case operationaltrust.EvidencePermissionsDenied,
- operationaltrust.EvidencePermissionsUnknown:
+ case operationaltrust.EvidencePermissionsUnknown:
+ // Partial history already says part of the scope went unread;
+ // unknown access describes that unread part, not the history
+ // this source did return.
+ if summary.HistoryCompleteness != ProtectionHistoryPartial {
+ hasUnknownBlock = true
+ }
+ case operationaltrust.EvidencePermissionsDenied:
hasUnknownBlock = true
}
diff --git a/internal/recovery/posture_test.go b/internal/recovery/posture_test.go
index 1f33181638..d595b5b2bf 100644
--- a/internal/recovery/posture_test.go
+++ b/internal/recovery/posture_test.go
@@ -147,6 +147,49 @@ func TestDeriveProtectionPostureTruthTable(t *testing.T) {
wantCoverage: ProtectionCoveragePartial,
wantText: "cannot confirm a backup",
},
+ {
+ name: "partial history with unknown access is attention when a backup exists",
+ summaries: func() []ProtectionProviderSummary {
+ summary := protectionTestSummary(now, &recent)
+ summary.HistoryCompleteness = ProtectionHistoryPartial
+ summary.Permissions = operationaltrust.EvidencePermissionsUnknown
+ return []ProtectionProviderSummary{summary}
+ }(),
+ wantState: ProtectionStateAttention,
+ wantFresh: ProtectionFreshnessCurrent,
+ wantVerify: ProtectionVerificationVerified,
+ wantCoverage: ProtectionCoveragePartial,
+ wantText: "only part of the backup history",
+ },
+ {
+ name: "partial history with unknown access and no backup does not claim one exists",
+ summaries: func() []ProtectionProviderSummary {
+ summary := protectionTestSummary(now, nil)
+ summary.HistoryCompleteness = ProtectionHistoryPartial
+ summary.Permissions = operationaltrust.EvidencePermissionsUnknown
+ summary.BackupPointCount = 0
+ return []ProtectionProviderSummary{summary}
+ }(),
+ wantState: ProtectionStateAttention,
+ wantFresh: ProtectionFreshnessUnknown,
+ wantVerify: ProtectionVerificationUnknown,
+ wantCoverage: ProtectionCoveragePartial,
+ wantText: "cannot confirm a backup",
+ },
+ {
+ name: "unavailable history with unknown access is unknown",
+ summaries: func() []ProtectionProviderSummary {
+ summary := protectionTestSummary(now, &recent)
+ summary.HistoryCompleteness = ProtectionHistoryUnavailable
+ summary.Permissions = operationaltrust.EvidencePermissionsUnknown
+ return []ProtectionProviderSummary{summary}
+ }(),
+ wantState: ProtectionStateUnknown,
+ wantFresh: ProtectionFreshnessCurrent,
+ wantVerify: ProtectionVerificationVerified,
+ wantCoverage: ProtectionCoverageUnknown,
+ wantText: "cannot read the backup history",
+ },
{
name: "permission denied is unknown",
summaries: func() []ProtectionProviderSummary {