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

Delete mount targets before deleting EFS volume #288

Merged
merged 2 commits into from
Sep 19, 2019
Merged

Conversation

hakanmemisoglu
Copy link
Contributor

Change Overview

Delete mount targets before deleting EFS volume.

Deleting volume with mount targets gives an error. To finish the operation completely, we must sure mount targets are delete before calling deletion method.

Pull request type

Please check the type of change your PR introduces:

  • Work in Progress
  • Refactoring (no functional changes, no api changes)
  • Trivial/Minor
  • Bugfix
  • Feature
  • Documentation

for _, mt := range mts {
req := &awsefs.DeleteMountTargetInput{}
req.SetMountTargetId(*mt.MountTargetId)
_, err := e.DeleteMountTargetWithContext(ctx, req)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hakanmemisoglu were can I find this function DeleteMountTargetWithContext definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavannd1
Copy link
Contributor

@hakanmemisoglu
LGTM. Have you done any tests with the fix?

@hakanmemisoglu
Copy link
Contributor Author

@pavannd1 Tested manually.

@mergify mergify bot merged commit f2dc494 into master Sep 19, 2019
@tdmanv tdmanv deleted the efs-vol-mt-delete branch September 19, 2019 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants