OCPBUGS-75913: Fix VolumeSnapshot race condition in backup processing#182
OCPBUGS-75913: Fix VolumeSnapshot race condition in backup processing#182jparrill wants to merge 1 commit intoopenshift:mainfrom
Conversation
…fully Fix race condition in CheckVolumeSnapshot() where snapshots deleted between List and Get calls would cause backup failures. Now gracefully skips deleted snapshots and continues processing remaining ones, matching the pattern used in CheckVolumeSnapshotContent(). This resolves intermittent PartiallyFailed backups (25/100 failure rate) when snapshot cleanup races with plugin processing. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
|
Skipping CI for Draft Pull Request. |
|
@jparrill: This pull request references Jira Issue OCPBUGS-75913, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 WalkthroughUpdates Go toolchain from 1.24.4 to 1.25.3 and upgrades multiple Kubernetes-related dependencies. Modifies .gitignore to include AI work directory and adjusts cache ignore pattern. Alters error handling in CheckVolumeSnapshot to skip missing VolumeSnapshot objects instead of failing. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jparrill The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira refresh |
|
@jparrill: This pull request references Jira Issue OCPBUGS-75913, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yli2@redhat.com), skipping review request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/auto-cc |
|
seems like you might want to add a test case and a log for this case. |
|
LGTM, I observed the problem with a similar probability on BM as well, cherry-picked this fix to latest oadp-1.5 and it fixes the problem indeed @enxebre IIUC in my case at least the VolumeSnapshot is processed and deleted by the time plugin gets to it |
|
New changes are detected. LGTM label has been removed. |
ce5f520 to
a3d51c8
Compare
|
Separating the deps bump in other commit: |
|
@jparrill: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@jparrill: This pull request references Jira Issue OCPBUGS-75913, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (jiezhao@redhat.com), skipping review request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
What this PR does / why we need it
This PR fixes a race condition in the
CheckVolumeSnapshot()function where VolumeSnapshots deleted between the List and Get calls would cause the entire backup to fail. The fix adds graceful handling of NotFound errors, allowing the plugin to skip deleted snapshots and continue processing remaining ones.Problem: When iterating over VolumeSnapshots from a List call, if a snapshot is deleted between the List (line 286) and subsequent Get call (line 292), the 404 NotFound error was treated as fatal, aborting processing of subsequent snapshots and marking backups as PartiallyFailed.
Solution: Add
apierrors.IsNotFound(err)handling inCheckVolumeSnapshot()to match the existing pattern inCheckVolumeSnapshotContent(), allowing deleted snapshots to be skipped gracefully.Impact: Reduces backup failure rate from 25/100 (observed with ARO-HCP PremiumV2 disks) to near 0% by eliminating this specific race condition.
Which issue(s) this PR fixes
Checklist
🤖 Generated with Claude Code via
/jira:solve OCPBUGS-75913 origin