mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-16 11:19:11 +00:00
The cold-startup race: if Pulse and the agent restart together, the monitor has no connection-health data when the agent calls checkRegistrationWithPulse at startup. The server defaults to registered=true (no known-disconnected entry), so the agent skips re-registration even though the token is stale. The node stays broken until the next manual agent restart. Fix: after the initial runProxmoxSetup call, start a background goroutine that waits 2 minutes (giving the monitor time to poll PVE and record failure state), then rechecks every 5 minutes via RunHealthCheck. RunHealthCheck only acts on types that have a local registration marker. Types without a marker are skipped to prevent uncontrolled token rotation when Pulse is temporarily unreachable — those need a full startup setup cycle via RunAll. Together with the two earlier commits this closes all three stale-token scenarios: install-time 401, long-running stale state, and cold-startup race. |
||
|---|---|---|
| .. | ||
| agent.go | ||
| agent_bench_test.go | ||
| agent_buffering_test.go | ||
| agent_collection_test.go | ||
| agent_flushbuffer_test.go | ||
| agent_metrics_test.go | ||
| agent_new_test.go | ||
| agent_sensors_test.go | ||
| agent_state_test.go | ||
| agent_test.go | ||
| buffer_persist_test.go | ||
| ceph.go | ||
| ceph_test.go | ||
| cluster_sensors.go | ||
| cluster_sensors_test.go | ||
| collector_observability_test.go | ||
| command_client_test.go | ||
| commands.go | ||
| commands_backoff_test.go | ||
| commands_connect_test.go | ||
| commands_coverage_test.go | ||
| commands_deploy.go | ||
| commands_deploy_test.go | ||
| commands_execute_test.go | ||
| commands_registration_test.go | ||
| commands_test.go | ||
| enroll.go | ||
| enroll_test.go | ||
| hostagent_coverage_test.go | ||
| mdadm.go | ||
| mdadm_test.go | ||
| mock_collector_test.go | ||
| network_helpers_test.go | ||
| os_identity.go | ||
| proxmox_setup.go | ||
| proxmox_setup_network_coverage_test.go | ||
| proxmox_setup_test.go | ||
| send_report_test.go | ||
| smartctl.go | ||
| smartctl_coverage_test.go | ||
| smartctl_test.go | ||
| sysinfo.go | ||
| sysinfo_test.go | ||
| unraid.go | ||
| unraid_test.go | ||
| version.go | ||