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.

Auto-clear removal block after successful Docker host stop

rcourtman6b670a7af357
diff --git a/internal/api/docker_agents.go b/internal/api/docker_agents.go
index 6258eae400..8e4a517d6c 100644
--- a/internal/api/docker_agents.go
+++ b/internal/api/docker_agents.go
@@ -170,6 +170,12 @@ func (h *DockerAgentHandlers) HandleCommandAck(w http.ResponseWriter, r *http.Re
if shouldRemove {
if _, removeErr := h.monitor.RemoveDockerHost(hostID); removeErr != nil {
log.Error().Err(removeErr).Str("dockerHostID", hostID).Str("commandID", commandID).Msg("Failed to remove docker host after command completion")
+ } else {
+ // Clear the removal block since the agent has confirmed it stopped successfully.
+ // This allows immediate re-enrollment without waiting for the 24-hour TTL.
+ if reenrollErr := h.monitor.AllowDockerHostReenroll(hostID); reenrollErr != nil {
+ log.Warn().Err(reenrollErr).Str("dockerHostID", hostID).Msg("Failed to clear removal block after successful stop")
+ }
}
}