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_group tests regularly failing #440

Closed
1 task done
tremble opened this issue Aug 5, 2021 · 3 comments · Fixed by #878
Closed
1 task done

ec2_group tests regularly failing #440

tremble opened this issue Aug 5, 2021 · 3 comments · Fixed by #878
Assignees
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type) python3 traceback

Comments

@tremble
Copy link
Contributor

tremble commented Aug 5, 2021

Summary

The ec2_group tests seem to be consistently failing

Issue Type

Bug Report

Component Name

ec2_group

Ansible Version

(CI)

Collection Versions

(CI)

AWS SDK versions

(CI)

Configuration

(CI)

OS / Environment

CI

Steps to Reproduce

Trigger integration tests

Expected Results

Success

Actual Results

https://dashboard.zuul.ansible.com/t/ansible/build/b31992de56524ef4a4d325a63c3bb46c/console

TASK [ec2_group : add a rule that auto creates another security group (CHECK MODE)] ***
task path: /home/zuul/.ansible/collections/ansible_collections/amazon/aws/tests/integration/targets/ec2_group/tasks/main.yml:446
<testhost> ESTABLISH LOCAL CONNECTION FOR USER: zuul
<testhost> EXEC /bin/sh -c 'echo ~zuul && sleep 0'
<testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/zuul/.ansible/tmp `"&& mkdir "` echo /home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135 `" && echo ansible-tmp-1627748612.2796433-5619-201358591405135="` echo /home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135 `" ) && sleep 0'
Using module file /home/zuul/.ansible/collections/ansible_collections/amazon/aws/plugins/modules/ec2_group.py
<testhost> PUT /home/zuul/.ansible/tmp/ansible-local-3520gvm4u706/tmpzwjhczcj TO /home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py
<testhost> EXEC /bin/sh -c 'chmod u+x /home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/ /home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py && sleep 0'
<testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /home/zuul/venv/bin/python /home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py && sleep 0'
<testhost> EXEC /bin/sh -c 'rm -f -r /home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py", line 114, in <module>
    _ansiballz_main()
  File "/home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py", line 106, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py", line 55, in invoke_module
    run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py", line 1379, in <module>
  File "/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py", line 1369, in main
  File "/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py", line 1114, in get_diff_final_resource
  File "/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py", line 1087, in get_final_rules
  File "/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible/module_utils/common/dict_transformations.py", line 44, in camel_dict_to_snake_dict
AttributeError: 'NoneType' object has no attribute 'items'
fatal: [testhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py\", line 114, in <module>\n    _ansiballz_main()\n  File \"/home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py\", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/zuul/.ansible/tmp/ansible-tmp-1627748612.2796433-5619-201358591405135/AnsiballZ_ec2_group.py\", line 55, in invoke_module\n    run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py\", line 1379, in <module>\n  File \"/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py\", line 1369, in main\n  File \"/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py\", line 1114, in get_diff_final_resource\n  File \"/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_group.py\", line 1087, in get_final_rules\n  File \"/tmp/ansible_ec2_group_payload_zwf74pzk/ansible_ec2_group_payload.zip/ansible/module_utils/common/dict_transformations.py\", line 44, in camel_dict_to_snake_dict\nAttributeError: 'NoneType' object has no attribute 'items'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

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 module module needs_triage plugins plugin (any type) python3 traceback labels Aug 5, 2021
ansible-zuul bot pushed a commit that referenced this issue Aug 5, 2021
Disable ec2_key, ec2_snapshot and ec2_group tests

SUMMARY
Work around #428 and #440 #441
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_key
ec2_snapshot
ec2_group
ADDITIONAL INFORMATION

Reviewed-by: Jill R <None>
Reviewed-by: None <None>
Reviewed-by: Paul Belanger <None>
Reviewed-by: Mark Chappell <None>
@tremble tremble removed the has_pr label Sep 17, 2021
@tremble tremble moved this from Todo to In Progress in Broken / Missing AWS Integration tests Jun 18, 2022
@tremble tremble self-assigned this Jun 18, 2022
@ansibullbot
Copy link

Repository owner moved this from In Progress to Done in Broken / Missing AWS Integration tests Jun 21, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jun 21, 2022
ec2_group - Add egress_rules and purge_egress_rules aliases

SUMMARY
Fix #440 - exception running with --diff and --check when creating a new SG by adding a rule referencing a missing SG.
Add egress_rules and purge_egress_rules aliases - while cleaning up the tests I kept writing "egress_rules" rather than "rules_egress".
Cleanup and re-enable ec2_group tests

Remove "Classic Networking" tests (we don't have this in CI and it'll be gone in August)
Fix Group/VPC deletion in tests (cross-referenced rules weren't being deleted, wipe the rules first)

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_group
ADDITIONAL INFORMATION
fixes: #440

Reviewed-by: Alina Buzachis <None>
tremble added a commit that referenced this issue Jun 21, 2022
SUMMARY
Fix #440 - exception running with --diff and --check when creating a new SG by adding a rule referencing a missing SG.
Add egress_rules and purge_egress_rules aliases - while cleaning up the tests I kept writing "egress_rules" rather than "rules_egress".
Cleanup and re-enable ec2_group tests

Remove "Classic Networking" tests (we don't have this in CI and it'll be gone in August)
Fix Group/VPC deletion in tests (cross-referenced rules weren't being deleted, wipe the rules first)

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_group

ADDITIONAL INFORMATION
fixes: #440

Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 922800d)
chirag1603 pushed a commit to chirag1603/amazon.aws that referenced this issue Jun 22, 2022
…collections#878)

ec2_group - Add egress_rules and purge_egress_rules aliases

SUMMARY
Fix ansible-collections#440 - exception running with --diff and --check when creating a new SG by adding a rule referencing a missing SG.
Add egress_rules and purge_egress_rules aliases - while cleaning up the tests I kept writing "egress_rules" rather than "rules_egress".
Cleanup and re-enable ec2_group tests

Remove "Classic Networking" tests (we don't have this in CI and it'll be gone in August)
Fix Group/VPC deletion in tests (cross-referenced rules weren't being deleted, wipe the rules first)

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_group
ADDITIONAL INFORMATION
fixes: ansible-collections#440

Reviewed-by: Alina Buzachis <None>
jatorcasso pushed a commit to jatorcasso/amazon.aws that referenced this issue Jun 27, 2022
…collections#878)

ec2_group - Add egress_rules and purge_egress_rules aliases

SUMMARY
Fix ansible-collections#440 - exception running with --diff and --check when creating a new SG by adding a rule referencing a missing SG.
Add egress_rules and purge_egress_rules aliases - while cleaning up the tests I kept writing "egress_rules" rather than "rules_egress".
Cleanup and re-enable ec2_group tests

Remove "Classic Networking" tests (we don't have this in CI and it'll be gone in August)
Fix Group/VPC deletion in tests (cross-referenced rules weren't being deleted, wipe the rules first)

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_group
ADDITIONAL INFORMATION
fixes: ansible-collections#440

Reviewed-by: Alina Buzachis <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
* More explanation as to why aws_config is 'unsupported'

* Make sure aws_config tests create resources with the 'usual' names.
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 module module plugins plugin (any type) python3 traceback
Development

Successfully merging a pull request may close this issue.

3 participants