-
Notifications
You must be signed in to change notification settings - Fork 342
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
'NoneType' object is not subscriptable error in ec2_vpc_igw module #647
Comments
Files identified in the description:
If these files are inaccurate, please update the |
This PR #672 should fix it. |
@alinabuzachis I'm still running into this issue when running integration tests for
|
ec2_vpc_igw: fix 'NoneType' object is not subscriptable Depends-On: ansible/ansible-zuul-jobs#1368 SUMMARY Add "InternetGatewayAttached" waiter Fixes #647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None> Reviewed-by: Abhijeet Kasurde <None>
…ections#691) ec2_vpc_igw: fix 'NoneType' object is not subscriptable Depends-On: ansible/ansible-zuul-jobs#1368 SUMMARY Add "InternetGatewayAttached" waiter Fixes ansible-collections#647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None> Reviewed-by: Abhijeet Kasurde <None>
I still see the issue when I run the integration tests in #631 |
So adding a waiter after attaching the igw still isnt enough it seems? Thoughts on waiting for igw after ensuring tags? @alinabuzachis |
Ok, I will also try to have a look if the error persists. BTW, the CI seems green now. @sebastien-rosset please feel free to open an issue if you encounter this issue again. |
The waiter I added after attaching definitely helps - it used to fail about 10% of the time and now its about 2% of the time (I ran bash scripts to run 50 iterations) - but the main problem is just the instability of calling describe_internet_gateways. We might just have to do a manual waiter prior to calling ensure_ec2_tags then again after and just return the gw directly to make 100% sure we have the object. Not pretty but I'm not sure what else we can do. |
`ec2_vpc_igw`: fix NoneType error SUMMARY use paginator for describe internet gateways and add retry_codes='InvalidInternetGatewayID.NotFound' (thanks @alinabuzachis) Fixes #647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw ADDITIONAL INFORMATION previously added InternetGatewayAttached waiter but problem still persists (#691) Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: Jill R <None>
…ections#691) ec2_vpc_igw: fix 'NoneType' object is not subscriptable Depends-On: ansible/ansible-zuul-jobs#1368 SUMMARY Add "InternetGatewayAttached" waiter Fixes ansible-collections#647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None> Reviewed-by: Abhijeet Kasurde <None> (cherry picked from commit 8cc9397)
…ections#691) ec2_vpc_igw: fix 'NoneType' object is not subscriptable Depends-On: ansible/ansible-zuul-jobs#1368 SUMMARY Add "InternetGatewayAttached" waiter Fixes ansible-collections#647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None> Reviewed-by: Abhijeet Kasurde <None> (cherry picked from commit 8cc9397)
ec2_vpc_igw: fix 'NoneType' object is not subscriptable (#691) Manual backport to stable-3: ec2_vpc_igw: fix 'NoneType' object is not subscriptable SUMMARY Add "InternetGatewayAttached" waiter Fixes #647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw Reviewed-by: Alina Buzachis Reviewed-by: Joseph Torcasso Reviewed-by: Jill R Reviewed-by: Abhijeet Kasurde (cherry picked from commit 8cc9397) SUMMARY ISSUE TYPE Bugfix Pull Request Docs Pull Request Feature Pull Request New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION
ec2_vpc_igw: fix 'NoneType' object is not subscriptable (#691) Manual backport to stable-2: ec2_vpc_igw: fix 'NoneType' object is not subscriptable SUMMARY Add "InternetGatewayAttached" waiter Fixes #647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw Reviewed-by: Alina Buzachis Reviewed-by: Joseph Torcasso Reviewed-by: Jill R Reviewed-by: Abhijeet Kasurde (cherry picked from commit 8cc9397) SUMMARY ISSUE TYPE Bugfix Pull Request Docs Pull Request Feature Pull Request New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION
`ec2_vpc_igw`: fix NoneType error SUMMARY use paginator for describe internet gateways and add retry_codes='InvalidInternetGatewayID.NotFound' (thanks @alinabuzachis) Fixes ansible-collections#647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw ADDITIONAL INFORMATION previously added InternetGatewayAttached waiter but problem still persists (ansible-collections#691) Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: Jill R <None> (cherry picked from commit 1965b05)
`ec2_vpc_igw`: fix NoneType error SUMMARY use paginator for describe internet gateways and add retry_codes='InvalidInternetGatewayID.NotFound' (thanks @alinabuzachis) Fixes ansible-collections#647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw ADDITIONAL INFORMATION previously added InternetGatewayAttached waiter but problem still persists (ansible-collections#691) Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: Jill R <None> (cherry picked from commit 1965b05)
`ec2_vpc_igw`: fix NoneType error (#695) ec2_vpc_igw: fix NoneType error SUMMARY use paginator for describe internet gateways and add retry_codes='InvalidInternetGatewayID.NotFound' (thanks @alinabuzachis) Fixes #647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw ADDITIONAL INFORMATION previously added InternetGatewayAttached waiter but problem still persists (#691) Reviewed-by: Abhijeet Kasurde Reviewed-by: Jill R (cherry picked from commit 1965b05) SUMMARY ISSUE TYPE Bugfix Pull Request Docs Pull Request Feature Pull Request New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION
`ec2_vpc_igw`: fix NoneType error (#695) ec2_vpc_igw: fix NoneType error SUMMARY use paginator for describe internet gateways and add retry_codes='InvalidInternetGatewayID.NotFound' (thanks @alinabuzachis) Fixes #647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw ADDITIONAL INFORMATION previously added InternetGatewayAttached waiter but problem still persists (#691) Reviewed-by: Abhijeet Kasurde Reviewed-by: Jill R (cherry picked from commit 1965b05) SUMMARY ISSUE TYPE Bugfix Pull Request Docs Pull Request Feature Pull Request New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION
I ran into this issue again |
@jatorcasso Where did you hit this error? |
I got it a few times here and there locally, but also saw it on CI tests https://ansible.softwarefactory-project.io/zuul/build/8e3437bcad9b4099af9dc081dfa70649 |
ec2_vpc_igw - dont user filters to paginate to fix NoneType error Depends-On: ansible/ansible-zuul-jobs#1498 SUMMARY Use gateway id when describing gateway instances as opposed to filters if possible to avoid bug of no gateways found. Fixes #647 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_igw Reviewed-by: Gonéri Le Bouder <[email protected]> Reviewed-by: Mark Chappell <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Alina Buzachis <None>
Summary
When submitting #646 to fix bug #622, the integration tests fail in the
ec2_vpc_igw
module. This seems to be unrelated to the changes I made in theaws_acm
module.The
ec2_vpc_igw
module fails withTypeError: 'NoneType' object is not subscriptable
. I don't think the module should ever fail with a NoneType error.Issue Type
Bug Report
Component Name
ec2_vpc_igw
Ansible Version
The environment (ansible version, collection version, SDK, OS...) is entirely determined by the PR process. The failures of the integration tests are here: #646 and https://ansible.softwarefactory-project.io/zuul/build/cb5198eefa104eeb9cd5c8bc6e12bdc1
It's not clear which part of the zuul logs contain the details about the environment. I've copy-pasted some data from the zuul logs.
Collection Versions
$ ansible-galaxy collection list
AWS SDK versions
$ pip show boto boto3 botocore
Configuration
$ ansible-config dump --only-changed
OS / Environment
No response
Steps to Reproduce
Expected Results
I expected the PR integration tests to complete without error. Or at least to complete without any error outside the changes I made.
More specifically:
ec2_vpc_igw
module should not fail.ec2_vpc_igw
module, it should handle the error more gracefully, not by raising a'NoneType' object is not subscriptable
exception"/tmp/ansible_ec2_vpc_igw_payload_g4o1kl_r/ansible_ec2_vpc_igw_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_vpc_igw.py", line 158, in get_igw_info
TypeError: 'NoneType' object is not subscriptable
Actual Results
The PR integration tests fail in the following modules:
Here is a specific stack trace for the ec2_vpc_igw module.
Code of Conduct
The text was updated successfully, but these errors were encountered: