Skip to content

bug: RemoteURL polling interval blocks drift-detection reconciliation - #1929

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:remoteurl-drift
Aug 20, 2026
Merged

bug: RemoteURL polling interval blocks drift-detection reconciliation#1929
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:remoteurl-drift

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

When a PolicyRef or KustomizationRef uses RemoteURL with an Interval, a successful reconcile schedules a periodic re-fetch by both returning reconcile.Result{RequeueAfter: interval} and setting NextReconcileTime in the ClusterSummary Status.
The latter suppresses every reconcile of that ClusterSummary until the cooldown expires.

A drift-detection-triggered reconcile only resets FeatureSummary status and that reconciliation is skipped till we are past NextReconcileTime.
So with SyncMode: ContinuousWithDriftDetection and a RemoteURL interval of 10 minutes for instance, a configuration drift would not be recovered till we are past NextReconcileTime.

The setNextReconcileTime call was incorrect. When RemoteURL is used, only a new reconciliation needs to be scheduled (to check whether the content of the remote URL has changed).

This PR fixes this issue by not setting the NextReconcileTime in this specific scenario.

test/fv/remote_url_test.go now uses ContinuousWithDriftDetection and deletes a deployed resource mid-test to verify Sveltos redeploys it promptly, rather than only exercising Continuous sync mode.

Fixes 1928

When a PolicyRef or KustomizationRef uses `RemoteURL` with an `Interval`, a successful
reconcile schedules a periodic re-fetch by both returning
`reconcile.Result{RequeueAfter: interval}` and setting NextReconcileTime in the
ClusterSummary Status.
The latter suppresses *every* reconcile of that ClusterSummary until the cooldown
expires.

A drift-detection-triggered reconcile only resets FeatureSummary status and that reconciliation
is skipped till we are past NextReconcileTime.
So with `SyncMode: ContinuousWithDriftDetection` and a RemoteURL interval of 10 minutes for
instance, a configuration drift would not be recovered till we are past NextReconcileTime.

The `setNextReconcileTime` call was incorrect. When RemoteURL is used, only a new reconciliation
needs to be scheduled (to check whether the content of the remote URL has changed).

This PR fixes this issue by not setting the NextReconcileTime in this specific scenario.

test/fv/remote_url_test.go now uses `ContinuousWithDriftDetection` and deletes a deployed
resource mid-test to verify Sveltos redeploys it promptly, rather than only exercising
`Continuous` sync mode.
@gianlucam76
gianlucam76 merged commit a285255 into projectsveltos:main Aug 20, 2026
11 checks passed
@gianlucam76
gianlucam76 deleted the remoteurl-drift branch August 20, 2026 18:23
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.

BUG: reconciliation of policies isn't reactive although syncMode is ContinuousWithDriftDetection

1 participant