You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handle CnsNotRegisteredFault by re-registering volumes in CNS operations
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 (both regular and with improved idempotency)
- CreateSnapshot (both regular and with improved idempotency)
- 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.
0 commit comments