-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Fix] AttachVolume error where volume region is empty #301
Conversation
…e to get volumes region. Switching to just use volume obj returned by API to validate is a better and more robust approach
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #301 +/- ##
=======================================
Coverage 74.83% 74.83%
=======================================
Files 22 22
Lines 2356 2356
=======================================
Hits 1763 1763
Misses 491 491
Partials 102 102 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the instance region and the volume region are actually different? How does a user recover from this situation, or get themselves into this situation?
@srust The region mismatch error serves as a critical validation check (sort of double checking). This issue typically surfaces only in specific multi-region scenarios where cluster configuration may be incomplete. Primary ScenarioThis issue occurs when:
Example CaseConsider this setup:
In this case, the CSI driver defaults to creating the volume in ORD (fallback region) instead of the intended IAD region, triggering the mismatch error. Note: This error should only manifest when utilizing the CSI driver's multi-region capabilities. This error should not be triggered with how we currently use and deploy CSI driver. Replacing the use of VolumeContext should make this check more reliable and not trigger anymore unless in very specific cases such as the one I mentioned above. Hope that answers your question! :) |
volumeContext[VolumeTopologyRegion] was not a reliable source to get volumes region. We saw multiple instances where this was returning an empty string which was causing the region mismatch failure. Switching to just use volume obj returned by API to validate is a better and more robust approach since LinodeVolume Obj returned by the API will always have the correct region field.
General:
Pull Request Guidelines: