Repository navigation
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
mnencia
force-pushed
the
dev/11616
branch
3 times, most recently
from
October 7, 2026 16:10
cc2ffc1 to
60c22ac
Compare
Member
Author
|
/test |
Contributor
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/37651122592 |
armru
approved these changes
Oct 8, 2026
Member
Author
|
/test |
Contributor
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/37810659442 |
Member
Author
|
/test |
Contributor
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/37832420196 |
armru
approved these changes
Oct 12, 2026
A second reconciliation working from a stale cached Backup could ask the instance manager to run it again. Make the status patch that marks the backup as started conditional on the resourceVersion that was read, and requeue on conflict. The major version is now persisted by that same patch. Closes #11616 Signed-off-by: Marco Nenciarini <[email protected]>
The comment claimed that patching the major version would refresh the Backup. It does not: the extra write only bumps the resourceVersion, so the start patch, locked on the version read by this reconciliation, would conflict with our own write. Signed-off-by: Armando Ruocco <[email protected]>
The test seam for running the backup command was a package variable swapped by the tests. Make it a field of the reconciler, set by NewBackupReconciler, as the instance status client already is, so a test configures it on the reconciler it builds. Signed-off-by: Armando Ruocco <[email protected]>
The Starting log line and event were emitted before the patch that marks the backup as started. A reconciliation that lost the race on a stale read, or whose patch failed, still announced a start, so the event count kept looking like a double start. Emit them after the patch succeeds, and log the conflict at debug level instead. Signed-off-by: Armando Ruocco <[email protected]>
Three paths patch a backup back to pending: the target Pod missing or not reporting its status, the target not ready, and another backup of the cluster in progress. The patch took no lock, so a reconciliation working from a stale cached Backup could overwrite the started phase written by the one that ran it, or a completed phase written by the instance manager once the cache caught up before listing the cluster backups. Lock that patch on the resourceVersion that was read, as the start patch already is, and requeue on conflict. Signed-off-by: Armando Ruocco <[email protected]>
A reconciliation that loses the optimistic lock no longer reports a backup that is already running as waiting for its target pod. The callers handle the conflict and log it at debug level. Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Remove the control spec and the fixtures no spec needs, and put back the GetStatus call, the patchErr name and the blank line that the earlier commits changed without need. Signed-off-by: Marco Nenciarini <[email protected]>
A stale read could start a volume snapshot backup again, or move a started one back to pending. Lock the start patch and the remaining pending patches on the version that was read. Both start patches now store the major version, so reconcileMajorVersion is removed. Signed-off-by: Marco Nenciarini <[email protected]>
The ReStarting events were emitted while checking whether the running backup was still valid, before the start patch. A reconciliation working from a stale cached Backup announced a restart that then lost the optimistic lock and never ran, and a volume snapshot backup, which is never restarted, got the event as well. Emit ReStarting from the instance manager start, once the patch succeeds and only when the backup had already been started on a pod, and log the reason of the restart where it is detected. The volume snapshot spec now also checks that a stale reconciliation stops before taking the snapshot, not only that it requeues. Signed-off-by: Armando Ruocco <[email protected]>
litaocdl
approved these changes
Oct 14, 2026
cnpg-bot
pushed a commit
that referenced
this pull request
Oct 14, 2026
A second reconciliation working from a stale cached Backup could ask the instance manager to run it again, start a volume snapshot backup again, or move a started backup back to pending. Make the status patches that mark the backup as started or pending conditional on the resourceVersion that was read, and requeue on conflict. The major version is now persisted by the start patches, and the Starting event is emitted only once that patch succeeds. Closes #11616 --------- Signed-off-by: Marco Nenciarini <[email protected]> Signed-off-by: Armando Ruocco <[email protected]> Co-authored-by: Armando Ruocco <[email protected]> (cherry picked from commit 88137ac)
mnencia
added a commit
that referenced
this pull request
Oct 14, 2026
A second reconciliation working from a stale cached Backup could ask the instance manager to run it again, start a volume snapshot backup again, or move a started backup back to pending. Make the status patches that mark the backup as started or pending conditional on the resourceVersion that was read, and requeue on conflict. The major version is now persisted by the start patches, and the Starting event is emitted only once that patch succeeds. Closes #11616 --------- Signed-off-by: Marco Nenciarini <[email protected]> Signed-off-by: Armando Ruocco <[email protected]> Co-authored-by: Armando Ruocco <[email protected]> (cherry picked from commit 88137ac) Signed-off-by: Marco Nenciarini <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A second reconciliation working from a stale cached Backup could ask the instance manager to run it again, start a volume snapshot backup again, or move a started backup back to pending. Make the status patches that mark the backup as started or pending conditional on the resourceVersion that was read, and requeue on conflict. The major version is now persisted by the start patches, and the Starting event is emitted only once that patch succeeds.
Closes #11616