mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-23 19:57:09 +00:00
cff4226531
The /api/diagnostics handler builds its own test client per PVE node to run a live connectivity probe. The PBS branch already passed node.Fingerprint into the test client config, but the PVE branch did not. With VerifySSL=true and a self-signed Proxmox cert (the standard configuration), tlsutil.CreateHTTPClientWithTimeout falls into default-secure mode and validates against the system CA chain, which fails the handshake even when the actual poller — which DOES pass the fingerprint — is connecting fine. The result was that /api/diagnostics reported delly + pi as "Failed to connect to Proxmox API" while /api/resources was happily ingesting all 27 workloads from the same hosts. Mirror the PBS branch by passing node.Fingerprint into the PVE testCfg so the diagnostic probe uses the same TLS verification path as the runtime poller. Add a regression test that spins up an httptest TLS server, captures its leaf cert SHA-256, configures a PVE instance with VerifySSL=true and that fingerprint, and asserts computeDiagnostics reports Connected=true. The pre-fix code fails this with a "tls: bad certificate" handshake error.