-
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
ec2_metadata_facts returns "AttributeError: 'int' object has no attribute 'items'" #1134
Comments
The last time this ran properly was using 4.1.0 and I will re-try that |
Versions up to 4.3.0 work as expected. 5.0.0 breaks as above. |
This took out some of our cloud automation, can also confirm that specifying version 4.x gets everything working again.
|
Hi, if possible please could you try #1138 and see if that fixes the issue. Unfortunately our integration tests for ec2_metadata_facts are apparently not running at all, so we didn't catch the issue. |
@tremble - Yes, making that change does fix the issue |
Fix AttributeError when running ec2_metadata_facts SUMMARY Prior to 5.0.0 we caught "Exception" within fetch, this was limited to json.JSONDecodeError, however it looks like we also needed to catch AttributeError for non-dict JSON ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_metadata_facts ADDITIONAL INFORMATION fixes: #1134
Fix AttributeError when running ec2_metadata_facts SUMMARY Prior to 5.0.0 we caught "Exception" within fetch, this was limited to json.JSONDecodeError, however it looks like we also needed to catch AttributeError for non-dict JSON ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_metadata_facts ADDITIONAL INFORMATION fixes: #1134 (cherry picked from commit c269898)
[PR #1138/c269898a backport][stable-5] Fix AttributeError when running ec2_metadata_facts This is a backport of PR #1138 as merged into main (c269898). SUMMARY Prior to 5.0.0 we caught "Exception" within fetch, this was limited to json.JSONDecodeError, however it looks like we also needed to catch AttributeError for non-dict JSON ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_metadata_facts ADDITIONAL INFORMATION fixes: #1134 Reviewed-by: Mark Chappell <None>
Prepare 5.0.2 release SUMMARY #1134 is kinda nasty, prepare 5.0.2 so we can get the fix out there. ISSUE TYPE Docs Pull Request COMPONENT NAME galaxy.yml ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None>
5.0.2 has been released and it believed to resolve this issue. |
Summary
When calling
amazon.aws.ec2_metadata_facts
against a remote RHEL 8 instance, I get the errorAttributeError: 'int' object has no attribute 'items'
Issue Type
Bug Report
Component Name
ec2_metadata_facts
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Target OS: RHEL 8 EC2 instance
Steps to Reproduce
This is being run as part of an overall molecule playbook. I'm not sure the best way to get a decent reproduction case here.
Expected Results
No error
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: