OCPBUGS-75913: Fix VolumeSnapshot race condition in backup processing#182
Conversation
|
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. 🎉 ℹ️ Recent review infoConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
ce5f520 to
a3d51c8
Compare
|
Separating the deps bump in other commit: |
|
@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. |
…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>
a3d51c8 to
981d4ff
Compare
|
@jparrill: all tests passed! 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. |
|
/lgtm |
|
@jparrill: Jira Issue OCPBUGS-75913: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-75913 has been moved to the MODIFIED state. 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 originSummary by CodeRabbit