Skip to content

fix: skip pull-mode clusters with a stale agent heartbeat - #507

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:report-collection
Sep 10, 2026
Merged

fix: skip pull-mode clusters with a stale agent heartbeat#507
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:report-collection

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

classifier's only readiness gate before deploying/polling a cluster checks SveltosCluster.Status.Ready, which is set once at initial registration and never flips back to false when a pull-mode agent stops reporting. Only Status.ConnectionStatus moves to Down, which classifier never checks.

As a result, a pull-mode cluster whose sveltos-applier agent has died still passes the readiness check on every reconcile, and classifier trying to deploy to such a cluster.

This PR adds isAgentHealthy, matching the helper already present in addon-controller, event-manager, and healthcheck-manager: for a pull-mode SveltosCluster, it checks pullmode.IsAgentTimeoutError(sveltosCluster) (backed by the heartbeat-timeout FailureMessage set by sveltoscluster-manager).

…ing deployment status

classifier's only readiness gate before deploying/polling a cluster checks
`SveltosCluster.Status.Ready`, which is set once at initial registration and never flips
back to false when a pull-mode agent stops reporting.
Only `Status.ConnectionStatus` moves to `Down`, which classifier never checks.

As a result, a pull-mode cluster whose sveltos-applier agent has died still passes the
readiness check on every reconcile, and classifier trying to deploy to such a cluster.

This PR adds `isAgentHealthy`, matching the helper already present in addon-controller,
event-manager, and healthcheck-manager: for a pull-mode `SveltosCluster`, it checks
`pullmode.IsAgentTimeoutError(sveltosCluster)` (backed by the heartbeat-timeout
`FailureMessage` set by sveltoscluster-manager).
@gianlucam76
gianlucam76 merged commit 6ef8012 into projectsveltos:main Sep 10, 2026
9 checks passed
@gianlucam76
gianlucam76 deleted the report-collection branch September 10, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant