Skip to content

fix(plugin): requeue when a hook asks for it without a delay - #11683

Merged
gbartolini merged 2 commits into
cloudnative-pg:mainfrom
valeriodelsarto:dev/11618
Oct 17, 2026
Merged

gbartolini merged 2 commits into
cloudnative-pg:mainfrom
valeriodelsarto:dev/11618

Conversation

@valeriodelsarto

@valeriodelsarto valeriodelsarto commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Since #11344 replaced the deprecated Requeue field, a reconciler hook returning BEHAVIOR_REQUEUE without requeue_after maps to an empty ctrl.Result, so the Cluster is not requeued at all. requeue_after is optional in CNPG-I, and the barman-cloud plugin returns no delay when the referenced ObjectStore doesn't exist yet: a Cluster created before its ObjectStore then stays in BootstrapPending until something else triggers a reconciliation.

Requeue after one second when no delay is requested.

Closes #11618

Assisted-by: Claude

Since cloudnative-pg#11344 replaced the deprecated `Requeue` field, a reconciler hook
returning `BEHAVIOR_REQUEUE` without `requeue_after` maps to an empty
`ctrl.Result`, so the Cluster is not requeued at all. `requeue_after` is
optional in CNPG-I, and the barman-cloud plugin returns no delay when
the referenced ObjectStore doesn't exist yet: a Cluster created before
its ObjectStore then stays in `BootstrapPending` until something else
triggers a reconciliation.

Requeue after one second when no delay is requested, as cloudnative-pg#11344 did for
the other `Requeue: true` call sites.

Closes cloudnative-pg#11618

Assisted-by: Claude Opus 5.5
Signed-off-by: Valerio Del Sarto <[email protected]>
@valeriodelsarto
valeriodelsarto requested a review from a team as a code owner October 17, 2026 08:52
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.28 release-1.30 labels Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

Signed-off-by: Marco Nenciarini <[email protected]>
@mnencia

mnencia commented Oct 17, 2026

Copy link
Copy Markdown
Member

/test

@github-actions

Copy link
Copy Markdown
Contributor

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Oct 17, 2026
@gbartolini
gbartolini merged commit 99e9645 into cloudnative-pg:main Oct 17, 2026
cnpg-bot pushed a commit that referenced this pull request Oct 17, 2026
Since #11344 replaced the deprecated `Requeue` field, a reconciler hook
returning `BEHAVIOR_REQUEUE` without `requeue_after` maps to an empty
`ctrl.Result`, so the Cluster is not requeued at all. `requeue_after` is
optional in CNPG-I, and the barman-cloud plugin returns no delay when
the referenced ObjectStore doesn't exist yet: a Cluster created before
its ObjectStore then stays in `BootstrapPending` until something else
triggers a reconciliation.

Requeue after one second when no delay is requested.

Closes #11618

Assisted-by: Claude

Signed-off-by: Valerio Del Sarto <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit 99e9645)
cnpg-bot pushed a commit that referenced this pull request Oct 17, 2026
Since #11344 replaced the deprecated `Requeue` field, a reconciler hook
returning `BEHAVIOR_REQUEUE` without `requeue_after` maps to an empty
`ctrl.Result`, so the Cluster is not requeued at all. `requeue_after` is
optional in CNPG-I, and the barman-cloud plugin returns no delay when
the referenced ObjectStore doesn't exist yet: a Cluster created before
its ObjectStore then stays in `BootstrapPending` until something else
triggers a reconciliation.

Requeue after one second when no delay is requested.

Closes #11618

Assisted-by: Claude

Signed-off-by: Valerio Del Sarto <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit 99e9645)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases ok to merge 👌 This PR can be merged release-1.28 release-1.30

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cluster stays in BootstrapPending forever when the ObjectStore is created after the Cluster ("requeuing" never requeues)

4 participants