-
Notifications
You must be signed in to change notification settings - Fork 350
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
ec2_vpc_nat_gateway using a dynamically-allocated eIP sometimes fails with botocore exception InvalidElasticIpID.NotFound #1872
Comments
On the surface this seems similar to #1320 but I don't think it's quite the same issue. |
The most likely cause is the AWS APIs being "eventually" consistent (the same as #1320). Sometimes the API calls will return things like the ID for a net-new resource before they can be consistently referenced. updating the client creation call to something like the following will probably
Would you be willing to open a PR? |
ansible-collections#2418) SUMMARY Closes ansible-collections#1872 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_nat_gateway Reviewed-by: Alina Buzachis Reviewed-by: GomathiselviS <gomathiselvi@gmail.com>
ansible-collections#2418) SUMMARY Closes ansible-collections#1872 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_nat_gateway Reviewed-by: Alina Buzachis Reviewed-by: GomathiselviS <gomathiselvi@gmail.com>
Summary
Creating a NAT gateway with ec2_vpc_nat_gateway using a dynamically-allocated eIP sometimes fails with a botocore exception InvalidElasticIpID.NotFound. This is despite the fact that the eIPallocation it references (eipalloc-0faae3f7d465f76f9 as per the example traceback below) does exist, at least after the fact, and also that no eIP is provided by the yaml so it is creating that eIP itself (as expected).
It's unclear to me why this happens, ie if it's a collection issue or a boto issue. I don't see any 'state' or similar attribute on an eIP that would suggest it might not be 'ready' as soon as it 'exists'. As such I'm not sure if/how the collection could check for that in between eIP creation and NATgw creation.
This is with aws collection 6.2.0, but I don't see any changes to ec2_vpc_nat_gateway.py in newer versions of 6.x
Issue Type
Bug Report
Component Name
ec2_vpc_nat_gateway
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
CentOS Stream release 9
Steps to Reproduce
Expected Results
This should create a new public NAT gateway, using a freshly-allocated Elastic IP.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: