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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Keep malformed nonempty pins in internal consolidation conflict evidence
pulse-triage[bot]f56599c14c56
diff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.mdindex 50505a27e0..813e4d9e66 100644--- a/docs/release-control/v6/internal/subsystems/monitoring.md+++ b/docs/release-control/v6/internal/subsystems/monitoring.md@@ -63,6 +63,9 @@ Saved-view consolidation also refuses a view with internal pin contradictions,so map indexing cannot hide an earlier contradictory row before monitoringstarts. `TestConsolidatePVEInstancesRetainsInternallyConflictingPins` coversboth merge orders, repeated rows, same-node/address evidence and agreeing formats.+Internal agreement uses the TLS verifier's case/colon comparison even when+legacy identity formatting would erase or simplify a malformed nonempty pin;+colon-only, whitespace and prefixed pins cannot hide a contradiction.The endpoint-ownership routing control uses a five-second fixture client anda ten-second enclosing caller lifetime, rather than a one-second latencycriterion. It records elapsed time and both targets' request counts; unchangeddiff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.mdindex e16167a0e7..7e11a3380c 100644--- a/docs/release-control/v6/internal/subsystems/security-privacy.md+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md@@ -64,6 +64,9 @@ Saved-view consolidation also refuses a view with internal pin contradictions,so map indexing cannot hide an earlier contradictory row before monitoringstarts. `TestConsolidatePVEInstancesRetainsInternallyConflictingPins` coversboth merge orders, repeated rows, same-node/address evidence and agreeing formats.+Internal agreement uses the TLS verifier's case/colon comparison even when+legacy identity formatting would erase or simplify a malformed nonempty pin;+colon-only, whitespace and prefixed pins cannot hide a contradiction.The endpoint-ownership routing control uses a five-second fixture client anda ten-second enclosing caller lifetime, rather than a one-second latencycriterion. It records elapsed time and both targets' request counts; unchangeddiff --git a/internal/config/pve_conflicting_rows_test.go b/internal/config/pve_conflicting_rows_test.goindex 12df670982..3088085ab7 100644--- a/internal/config/pve_conflicting_rows_test.go+++ b/internal/config/pve_conflicting_rows_test.go@@ -10,34 +10,36 @@ import (// orders and a final repeated row matching the other view's selected pin.func TestConsolidatePVEInstancesRetainsInternallyConflictingPins(t *testing.T) {for _, layout := range []string{"same-node", "same-address"} {- for _, reverse := range []bool{false, true} {- t.Run(layout+map[bool]string{false: "/forward", true: "/reverse"}[reverse], func(t *testing.T) {- member := ClusterEndpoint{NodeName: "member", Host: "https://member.invalid:8006", Fingerprint: "aa:bb"}- conflicting := member- conflicting.Fingerprint = "cc:dd"- if layout == "same-address" {- conflicting.NodeName = "member-alias"- }- ambiguous := PVEInstance{Name: "Ambiguous", IsCluster: true, ClusterName: "home", Host: member.Host, Fingerprint: "aa:bb", ClusterEndpoints: []ClusterEndpoint{member, conflicting, member}}- ordinary := PVEInstance{Name: "Ordinary", IsCluster: true, ClusterName: "home", Host: member.Host, Fingerprint: "aa:bb", ClusterEndpoints: []ClusterEndpoint{member}}- instances := []PVEInstance{ambiguous, ordinary}- if reverse {- instances[0], instances[1] = instances[1], instances[0]- }- saved := []PVEInstance{instances[0].DeepCopy(), instances[1].DeepCopy()}- got, changed := ConsolidatePVEInstances(instances)- if changed || !reflect.DeepEqual(got, saved) || !reflect.DeepEqual(instances, saved) {- t.Fatal("consolidation discarded contradictory saved trust or changed source rows")- }- if PVEClusterInstancesShareIdentity(instances[0], instances[1]) {- t.Fatal("internally contradictory saved trust admitted an identity merge")- }- // Independently reconciled saved formats can still consolidate normally.- ambiguous.ClusterEndpoints[1].Fingerprint = "AA:BB"- if _, changed := ConsolidatePVEInstances([]PVEInstance{ambiguous, ordinary}); !changed {- t.Fatal("agreeing independently reconciled views could no longer consolidate")- }- })+ for _, conflictingPin := range []string{"cc:dd", ":", " ", "sha256:aa:bb"} {+ for _, reverse := range []bool{false, true} {+ t.Run(layout+"/pin="+conflictingPin+map[bool]string{false: "/forward", true: "/reverse"}[reverse], func(t *testing.T) {+ member := ClusterEndpoint{NodeName: "member", Host: "https://member.invalid:8006", Fingerprint: "aa:bb"}+ conflicting := member+ conflicting.Fingerprint = conflictingPin+ if layout == "same-address" {+ conflicting.NodeName = "member-alias"+ }+ ambiguous := PVEInstance{Name: "Ambiguous", IsCluster: true, ClusterName: "home", Host: member.Host, Fingerprint: "aa:bb", ClusterEndpoints: []ClusterEndpoint{member, conflicting, member}}+ ordinary := PVEInstance{Name: "Ordinary", IsCluster: true, ClusterName: "home", Host: member.Host, Fingerprint: "aa:bb", ClusterEndpoints: []ClusterEndpoint{member}}+ instances := []PVEInstance{ambiguous, ordinary}+ if reverse {+ instances[0], instances[1] = instances[1], instances[0]+ }+ saved := []PVEInstance{instances[0].DeepCopy(), instances[1].DeepCopy()}+ got, changed := ConsolidatePVEInstances(instances)+ if changed || !reflect.DeepEqual(got, saved) || !reflect.DeepEqual(instances, saved) {+ t.Fatal("consolidation discarded contradictory saved trust or changed source rows")+ }+ if PVEClusterInstancesShareIdentity(instances[0], instances[1]) {+ t.Fatal("internally contradictory saved trust admitted an identity merge")+ }+ // Independently reconciled saved formats can still consolidate normally.+ ambiguous.ClusterEndpoints[1].Fingerprint = "AA:BB"+ if _, changed := ConsolidatePVEInstances([]PVEInstance{ambiguous, ordinary}); !changed {+ t.Fatal("agreeing independently reconciled views could no longer consolidate")+ }+ })+ }}}}diff --git a/internal/config/pve_instances.go b/internal/config/pve_instances.goindex 7feb513837..cec04e33c5 100644--- a/internal/config/pve_instances.go+++ b/internal/config/pve_instances.go@@ -96,21 +96,34 @@ func pveClusterInstancesHaveFingerprintConflict(a, b PVEInstance) bool {indexEndpoints := func(instance PVEInstance) (byNode, byKey map[string]string, ambiguous bool) {byNode = make(map[string]string)byKey = make(map[string]string)+ trustByNode, trustByKey := make(map[string]string), make(map[string]string)for _, endpoint := range instance.ClusterEndpoints {+ // Internal trust agreement follows the verifier, not the broader+ // legacy identity presentation normalization below. A malformed+ // nonempty pin must not become absent or agree with a valid pin.+ if endpoint.Fingerprint != "" {+ trust := strings.ToLower(strings.ReplaceAll(endpoint.Fingerprint, ":", ""))+ if node := strings.TrimSpace(strings.ToLower(endpoint.NodeName)); node != "" {+ if previous, ok := trustByNode[node]; ok && previous != trust {+ ambiguous = true+ }+ trustByNode[node] = trust+ }+ for _, key := range clusterEndpointIdentityKeys(endpoint) {+ if previous, ok := trustByKey[key]; ok && previous != trust {+ ambiguous = true+ }+ trustByKey[key] = trust+ }+ }fp := normalizeProxmoxFingerprint(endpoint.Fingerprint)if fp == "" {continue}if node := strings.TrimSpace(strings.ToLower(endpoint.NodeName)); node != "" {- if previous, ok := byNode[node]; ok && previous != fp {- ambiguous = true- }byNode[node] = fp}for _, key := range clusterEndpointIdentityKeys(endpoint) {- if previous, ok := byKey[key]; ok && previous != fp {- ambiguous = true- }byKey[key] = fp}}