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

Fix EIP release in ec2_vpc_nat_gateway #20167

Merged

Conversation

willthames
Copy link
Contributor

@willthames willthames commented Jan 12, 2017

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_vpc_nat_gateway

ANSIBLE VERSION
ansible 2.3.0 (devel e35a757ee7) last updated 2017/01/12 16:42:33 (GMT +1000)
  config file = 
  configured module search path = Default w/o overrides
SUMMARY

Check if EIP exists before deleting it

After deleting the NAT gateway, the EIP sometimes seems to
cease to exist afterwards. Check if it exists before deleting it.

Otherwise you get:

Failed to release EIP eipalloc-abdc1234: An error occurred (InvalidAllocationID.NotFound) \
when calling the ReleaseAddress operation: The allocation ID 'eipalloc-abcd1234' does not \
exist", "success": false}

Also fix some flake8 issues in a separate commit

Will Thames added 2 commits January 12, 2017 16:41
After deleting the NAT gateway, the EIP sometimes seems to
cease to exist afterwards. Check if it exists before deleting it.

Otherwise you get:
```
Failed to release EIP eipalloc-abdc1234: An error occurred (InvalidAllocationID.NotFound) \
when calling the ReleaseAddress operation: The allocation ID 'eipalloc-abcd1234' does not \
exist", "success": false}
```
@willthames willthames changed the title Ec2 vpc nat gateway release eip race Fix EIP release in ec2_vpc_nat_gateway Jan 12, 2017
@ansibot
Copy link
Contributor

ansibot commented Jan 12, 2017

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 aws bugfix_pull_request cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. labels Jan 12, 2017
@nitzmahone nitzmahone removed the needs_triage Needs a first human triage before being processed. label Jan 13, 2017
@linuxdynasty
Copy link
Contributor

This looks good to me @willthames

@ryansb ryansb merged commit 950ff3f into ansible:devel Feb 1, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 aws bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants