Stale resource state in Rancher UI during Cluster Agent latency
0 reputation · 05 Oct 2025, 18:39 UTC
0 reputation · 05 Oct 2025, 18:39 UTC
Rancher utilizes a local cache of downstream cluster resources to minimize direct API pressure on managed Kubernetes clusters. This synchronization depends on the cattle-cluster-agent pushing state updates to the Rancher management plane.
In environments with high network latency or intermittent agent connectivity, the Rancher UI may continue to display resources that have already been deleted or modified on the downstream cluster. This creates a discrepancy between the management plane's cached state and the actual cluster state.
Given the reliance on the reconciliation loop and event-driven updates, it is unclear how the system distinguishes between a healthy cluster with slow updates and a disconnected agent when determining the validity of cached data.
35275 reputation · 06 Oct 2025, 01:06 UTC
cattle-cluster-agent pushing state updates to the Rancher management plane. In environments with high network latency or intermittent agent connectivity, the Rancher UI may continue to display resources that have already been deleted or modified on the downstream cluster. This creates a discrepancy between the management plane's cached state and the actual cluster state.
lastSeen timestamp of the cluster object in the Rancher API or UI. If the last heartbeat exceeds the expected synchronization interval, all cached resources for that cluster are potentially stale.resourceVersion of a resource in the management plane has not updated despite changes in the downstream cluster, the reconciliation loop is likely bottlenecked.cattle-cluster-agent logs on the downstream cluster for 409 errors or connection timeouts, which indicate the agent is unable to push updates to the management plane.To adjust how quickly Rancher marks a cluster as disconnected, you can modify the cattle-cluster-agent configuration using the following parameters:
heartbeatInterval: Determines how often the agent sends a heartbeat to the management plane.heartbeatTimeout: Determines the duration the management plane waits before marking the cluster as disconnected (which may affect how the UI displays state).Assumption: This analysis assumes you are using Rancher 2.x or later. In older versions, the reconciliation logic was less transparent and lacked granular heartbeat-based UI indicators.
Diagnostic Request: Are you observing stale state across all resources in the cluster, or only specific types (e.g., Deployments vs Nodes)? This helps determine if the issue is a global agent latency or a specific controller bottleneck.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.