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

Add missing parameters. Fixes TypeError exception #39105

Merged
merged 1 commit into from
Apr 20, 2018

Conversation

shifty35
Copy link
Contributor

SUMMARY

Exceptions thrown when ec2_ami fails to create an image due to bad permissions (or other errors). Attribute missing in string formatting throws exception.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_ami

ANSIBLE VERSION
ansible --version
ansible 2.5.1
  config file = None
  configured module search path = [u'/home/ec2-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.5.1-py2.7.egg/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
ADDITIONAL INFORMATION

Stack trace from error:

Traceback (most recent call last):
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1524256826.73-122688373381022/debug_dir/ansible_module_ec2_ami.py", line 704, in <module>
    main()
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1524256826.73-122688373381022/debug_dir/ansible_module_ec2_ami.py", line 700, in main
    create_image(module, connection)
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1524256826.73-122688373381022/debug_dir/ansible_module_ec2_ami.py", line 491, in create_image
    **get_ami_info(get_image_by_id(module, connection, image_id)))
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1524256826.73-122688373381022/debug_dir/ansible_module_ec2_ami.py", line 632, in get_image_by_id
    module.fail_json_aws(e, msg="Error retrieving image attributes" % image_id)
TypeError: not all arguments converted during string formatting

@ansibot
Copy link
Contributor

ansibot commented Apr 20, 2018

@ansibot ansibot added aws bug This issue/PR relates to a bug. cloud committer_review In order to be merged, this PR must follow the certified review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:certified This issue/PR relates to certified code. labels Apr 20, 2018
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Apr 20, 2018
@s-hertel s-hertel merged commit d365375 into ansible:devel Apr 20, 2018
@s-hertel
Copy link
Contributor

Thanks @shifty35!

oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 14, 2018
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 15, 2018
ilicmilan pushed a commit to ilicmilan/ansible that referenced this pull request Nov 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aws bug This issue/PR relates to a bug. cloud committer_review In order to be merged, this PR must follow the certified review workflow. module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. support:certified This issue/PR relates to certified code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants