-
Notifications
You must be signed in to change notification settings - Fork 201
handle CnsNotRegisteredFault, re-register volume and continue volume operations #3788
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
base: master
Are you sure you want to change the base?
handle CnsNotRegisteredFault, re-register volume and continue volume operations #3788
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: divyenpatel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
bd3e2f8 to
8469478
Compare
|
@divyenpatel: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
8469478 to
49fc6ee
Compare
This commit adds handling for CnsNotRegisteredFault in various CNS volume operations for the WORKLOAD cluster flavor. When a volume operation fails with CnsNotRegisteredFault, the driver now attempts to re-register the volume with CNS and retries the operation. Changes include: - Add clusterId and clusterDistribution parameters to GetManager() for volume re-registration - Add reRegisterVolume() function to re-register unregistered volumes - Add IsCnsNotRegisteredFault() helper to detect the fault type - Add IsCnsVolumeAlreadyExistsFault() helper for idempotent re-registration - Handle CnsNotRegisteredFault in: - AttachVolume - DetachVolume - DeleteVolume (with improved idempotency) - UpdateVolumeMetadata - UpdateVolumeCrypto - ExpandVolume (with improved idempotency) - CreateSnapshot (with improved idempotency and with transaction) - DeleteSnapshot - Add TODO for batch attach reconcile to handle unregistered volumes when QueryBackingTypeFromVirtualDiskInfo is used (PR kubernetes-sigs#3799) The re-registration is only attempted once per operation to prevent infinite loops. If re-registration fails or the retry fails, the original error is returned.
49fc6ee to
a2961cf
Compare
What this PR does / why we need it:
This PR adds handling for CnsNotRegisteredFault in various CNS volume operations for the WORKLOAD cluster flavor. When a volume operation fails with CnsNotRegisteredFault, the driver now attempts to re-register the volume with CNS and retries the operation.
Changes include:
Add TODO for batch attach reconcile to handle unregistered volumes when QueryBackingTypeFromVirtualDiskInfo is used (PR #3799)
Re-registration is attempted only once per operation to prevent infinite loops. If re-registration fails or the retry fails, the original error is returned.
Testing done:
Refer to tests and logs here - https://gist.github.com/divyenpatel/c48fddcc2bb7323fbbd168d4e035ff6a
Special notes for your reviewer:
Release note: