This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
Refactor fsx-filesystems.go to enhance error handling and robustness #1249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deleting FSx filesystems is failing when trying to delete an SVM with non-root attached volumes.
These changes ensure a more reliable cleanup process by handling associated SVMs and volumes and adding retry logic for file system deletion. This is necessary because
Added retry logic for file system deletion with
deleteFileSystemWithRetry
, attempting up to 5 times with a 10-second delay.Introduced handling for Storage Virtual Machines (SVMs) by describing and deleting associated SVMs and non-root volumes before deleting the file system.
Added helper function
isRootVolume
to identify root volumes by their name suffix.