Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

hidday
Copy link

@hidday hidday commented Jul 31, 2024

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

  1. Added retry logic for file system deletion with deleteFileSystemWithRetry, attempting up to 5 times with a 10-second delay.

  2. Introduced handling for Storage Virtual Machines (SVMs) by describing and deleting associated SVMs and non-root volumes before deleting the file system.

  3. Added helper function isRootVolume to identify root volumes by their name suffix.

…ess:

1. Added retry logic for file system deletion with `deleteFileSystemWithRetry`, attempting up to 5 times with a 10-second delay.
2. Introduced handling for Storage Virtual Machines (SVMs) by describing and deleting associated SVMs and non-root volumes before deleting the file system.
3. Added helper function `isRootVolume` to identify root volumes by their name suffix.
@ekristen
Copy link
Contributor

ekristen commented Oct 2, 2024

@hidday I'm not going to be able to accept this PR as written. It introduces a blocking delete command. I understand you are trying to make this more robust and there are parts of this that should be implemented.

The way the tool works though is that if the remove fails, it will retry that resource over and over again. Now if all resources left in queue fail 3 times in a row then the tool will exit.

The other issue is that this might need to be split up into multiple resources, given you are calling remove on several other resources as well.

I've opened an issue here for tracking -- ekristen/aws-nuke#360


Please see the copy of the notice from the README about the deprecation of this project. Sven was kind enough to grant me access to help triage and close issues and pull requests that have already been addressed in the actively maintained fork. Some additional information is located in the welcome issue for more information.

Caution

This repository for aws-nuke is no longer being actively maintained. We recommend users to switch to the actively maintained fork of this project at ekristen/aws-nuke.
We appreciate all the support and contributions we've received throughout the life of this project. We believe that the fork will continue to provide the functionality and support that you have come to expect from aws-nuke.
Please note that this deprecation means we will not be addressing issues, accepting pull requests, or making future releases from this repository.
Thank you for your understanding and support.

@ekristen ekristen closed this Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants