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

ec2_security_group - exception when group_name or group_id is a list #1217

Open
1 task done
tremble opened this issue Oct 27, 2022 · 2 comments
Open
1 task done

ec2_security_group - exception when group_name or group_id is a list #1217

tremble opened this issue Oct 27, 2022 · 2 comments
Assignees
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) python3 traceback

Comments

@tremble
Copy link
Contributor

tremble commented Oct 27, 2022

Summary

Working on #1214 I've uncovered that --diff will throw an exception if group_name or group_id is a list:

2022-10-27 11:58:03.617055 | controller | TASK [ec2_security_group : Create a group with self-referring rule] ************
2022-10-27 11:58:03.617058 | controller | task path: /home/zuul/.ansible/collections/ansible_collections/amazon/aws/tests/integration/targets/ec2_security_group/tasks/rule_group_create.yml:3
2022-10-27 11:58:08.598925 | controller | Using module file /home/zuul/.ansible/collections/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py
2022-10-27 11:58:08.598976 | controller | Pipelining is enabled.
2022-10-27 11:58:08.598983 | controller | <testhost> ESTABLISH LOCAL CONNECTION FOR USER: zuul
2022-10-27 11:58:08.598988 | controller | <testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /home/zuul/venv/bin/python && sleep 0'
2022-10-27 11:58:08.598993 | controller | The full traceback is:
2022-10-27 11:58:08.598997 | controller | Traceback (most recent call last):
2022-10-27 11:58:08.599007 | controller |   File "/tmp/ansible_ec2_security_group_payload_7_o0can2/ansible_ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py", line 1120, in group_exists
2022-10-27 11:58:08.599013 | controller |   File "/tmp/ansible_ec2_security_group_payload_7_o0can2/ansible_ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py", line 676, in sg_exists_with_backoff
2022-10-27 11:58:08.599018 | controller |   File "/tmp/ansible_ec2_security_group_payload_7_o0can2/ansible_ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/modules.py", line 354, in deciding_wrapper
2022-10-27 11:58:08.599023 | controller |     return retrying_wrapper(*args, **kwargs)
2022-10-27 11:58:08.599027 | controller |   File "/tmp/ansible_ec2_security_group_payload_7_o0can2/ansible_ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 118, in _retry_wrapper
2022-10-27 11:58:08.599032 | controller |     return _retry_func(
2022-10-27 11:58:08.599036 | controller |   File "/tmp/ansible_ec2_security_group_payload_7_o0can2/ansible_ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 68, in _retry_func
2022-10-27 11:58:08.599040 | controller |     return func()
2022-10-27 11:58:08.599045 | controller |   File "/home/zuul/venv/lib/python3.9/site-packages/botocore/client.py", line 386, in _api_call
2022-10-27 11:58:08.599049 | controller |     return self._make_api_call(operation_name, kwargs)
2022-10-27 11:58:08.599053 | controller |   File "/home/zuul/venv/lib/python3.9/site-packages/botocore/client.py", line 677, in _make_api_call
2022-10-27 11:58:08.599061 | controller |     request_dict = self._convert_to_request_dict(
2022-10-27 11:58:08.599066 | controller |   File "/home/zuul/venv/lib/python3.9/site-packages/botocore/client.py", line 725, in _convert_to_request_dict
2022-10-27 11:58:08.599071 | controller |     request_dict = self._serializer.serialize_to_request(
2022-10-27 11:58:08.599076 | controller |   File "/home/zuul/venv/lib/python3.9/site-packages/botocore/validate.py", line 319, in serialize_to_request
2022-10-27 11:58:08.599080 | controller |     raise ParamValidationError(report=report.generate_report())
2022-10-27 11:58:08.599084 | controller | botocore.exceptions.ParamValidationError: Parameter validation failed:
2022-10-27 11:58:08.599089 | controller | Invalid type for parameter Filters[0].Values[0], value: ['ansible-test-72084338-node-0003193695-auto-create-1'], type: <class 'list'>, valid types: <class 'str'>
2022-10-27 11:58:08.599094 | controller | fatal: [testhost]: FAILED! => {

Issue Type

Bug Report

Component Name

ec2_security_group

Ansible Version

CI

Collection Versions

CI / 5.0.0

AWS SDK versions

CI

Configuration

CI

OS / Environment

CI

Steps to Reproduce

Pass group_name as a list

Expected Results

successful execution

Actual Results

Exception as above

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) python3 traceback labels Oct 27, 2022
@tremble tremble changed the title ec2_security_group ec2_security_group - exception when group_name or group_id is a list Feb 6, 2023
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
fix assert of deploymentCircuitBreaker

SUMMARY
fix broken ecs_cluster integration test of ansible-collections#1215
cc @tremble  @karcadia
ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) python3 traceback
Projects
None yet
Development

No branches or pull requests

2 participants