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_vpc_endpoint: idempotency broken with tags #475

Closed
1 task done
goneri opened this issue Jul 14, 2021 · 2 comments · Fixed by #1167
Closed
1 task done

ec2_vpc_endpoint: idempotency broken with tags #475

goneri opened this issue Jul 14, 2021 · 2 comments · Fixed by #1167
Assignees
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type) python3

Comments

@goneri
Copy link
Member

goneri commented Jul 14, 2021

Summary

2021-07-14 09:38:33.405810 | fedora-34 | TASK [ec2_vpc_endpoint : Assert tag lookup found endpoint] *********************
2021-07-14 09:38:33.406102 | fedora-34 | task path: /home/zuul/.ansible/collections/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_endpoint/tasks/main.yml:569
2021-07-14 09:38:33.508974 | fedora-34 | ok: [testhost] => {
2021-07-14 09:38:33.509043 | fedora-34 |     "changed": false,
2021-07-14 09:38:33.509058 | fedora-34 |     "msg": "All assertions passed"
2021-07-14 09:38:33.509071 | fedora-34 | }
2021-07-14 09:38:33.527684 | fedora-34 |
2021-07-14 09:38:33.527732 | fedora-34 | TASK [ec2_vpc_endpoint : Tag the endpoint - idempotency (check_mode)] **********
2021-07-14 09:38:33.528074 | fedora-34 | task path: /home/zuul/.ansible/collections/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_endpoint/tasks/main.yml:578
2021-07-14 09:38:33.594817 | fedora-34 | <testhost> ESTABLISH LOCAL CONNECTION FOR USER: zuul
2021-07-14 09:38:33.595746 | fedora-34 | <testhost> EXEC /bin/sh -c 'echo ~zuul && sleep 0'
2021-07-14 09:38:33.608906 | fedora-34 | <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/zuul/.ansible/tmp `"&& mkdir "` echo /home/zuul/.ansible/tmp/ansible-tmp-1626255513.6074903-7349-157948379373724 `" && echo ansible-tmp-1626255513.6074903-7349-157948379373724="` echo /home/zuul/.ansible/tmp/ansible-tmp-1626255513.6074903-7349-157948379373724 `" ) && sleep 0'
2021-07-14 09:38:33.630325 | fedora-34 | Using module file /home/zuul/.ansible/collections/ansible_collections/community/aws/plugins/modules/ec2_vpc_endpoint.py
2021-07-14 09:38:33.631788 | fedora-34 | <testhost> PUT /home/zuul/.ansible/tmp/ansible-local-66792r0f878_/tmpz3fqdit_ TO /home/zuul/.ansible/tmp/ansible-tmp-1626255513.6074903-7349-157948379373724/AnsiballZ_ec2_vpc_endpoint.py
2021-07-14 09:38:33.633448 | fedora-34 | <testhost> EXEC /bin/sh -c 'chmod u+x /home/zuul/.ansible/tmp/ansible-tmp-1626255513.6074903-7349-157948379373724/ /home/zuul/.ansible/tmp/ansible-tmp-1626255513.6074903-7349-157948379373724/AnsiballZ_ec2_vpc_endpoint.py && sleep 0'
2021-07-14 09:38:33.645929 | fedora-34 | <testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /home/zuul/venv/bin/python /home/zuul/.ansible/tmp/ansible-tmp-1626255513.6074903-7349-157948379373724/AnsiballZ_ec2_vpc_endpoint.py && sleep 0'
2021-07-14 09:38:35.337836 | fedora-34 | <testhost> EXEC /bin/sh -c 'rm -f -r /home/zuul/.ansible/tmp/ansible-tmp-1626255513.6074903-7349-157948379373724/ > /dev/null 2>&1 && sleep 0'
2021-07-14 09:38:35.361986 | fedora-34 | changed: [testhost] => {
2021-07-14 09:38:35.362037 | fedora-34 |     "changed": true,
2021-07-14 09:38:35.362052 | fedora-34 |     "invocation": {
2021-07-14 09:38:35.362064 | fedora-34 |         "module_args": {
2021-07-14 09:38:35.362076 | fedora-34 |             "aws_access_key": "ASIA6CCDWXDODJ5F62SC",
2021-07-14 09:38:35.362088 | fedora-34 |             "aws_ca_bundle": null,
2021-07-14 09:38:35.362100 | fedora-34 |             "aws_config": null,
2021-07-14 09:38:35.362112 | fedora-34 |             "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
2021-07-14 09:38:35.362138 | fedora-34 |             "client_token": null,
2021-07-14 09:38:35.362149 | fedora-34 |             "debug_botocore_endpoint_logs": true,
2021-07-14 09:38:35.362160 | fedora-34 |             "ec2_url": null,
2021-07-14 09:38:35.362171 | fedora-34 |             "policy": null,
2021-07-14 09:38:35.362182 | fedora-34 |             "policy_file": null,
2021-07-14 09:38:35.362193 | fedora-34 |             "profile": null,
2021-07-14 09:38:35.362203 | fedora-34 |             "purge_tags": false,
2021-07-14 09:38:35.362214 | fedora-34 |             "region": "us-east-1",
2021-07-14 09:38:35.362225 | fedora-34 |             "route_table_ids": [
2021-07-14 09:38:35.362249 | fedora-34 |                 "rtb-02aabf4c69c355bef"
2021-07-14 09:38:35.362262 | fedora-34 |             ],
2021-07-14 09:38:35.362289 | fedora-34 |             "security_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
2021-07-14 09:38:35.362299 | fedora-34 |             "service": "com.amazonaws.us-east-1.s3",
2021-07-14 09:38:35.362310 | fedora-34 |             "state": "present",
2021-07-14 09:38:35.362321 | fedora-34 |             "tags": {
2021-07-14 09:38:35.362331 | fedora-34 |                 "PascalCase": "HelloWorld",
2021-07-14 09:38:35.362342 | fedora-34 |                 "Title Case": "Hello World",
2021-07-14 09:38:35.362352 | fedora-34 |                 "camelCase": "helloWorld",
2021-07-14 09:38:35.362363 | fedora-34 |                 "lowercase spaced": "hello world",
2021-07-14 09:38:35.362373 | fedora-34 |                 "snake_case": "hello_world",
2021-07-14 09:38:35.362384 | fedora-34 |                 "testPrefix": "ansible-test-22865948-fedora-34-1vcpu-vexxhost-sjc1-0001636835"
2021-07-14 09:38:35.362414 | fedora-34 |             },
2021-07-14 09:38:35.362425 | fedora-34 |             "validate_certs": true,
2021-07-14 09:38:35.362456 | fedora-34 |             "vpc_endpoint_id": "vpce-0c50cc7557a62a6c2",
2021-07-14 09:38:35.362469 | fedora-34 |             "vpc_endpoint_type": "Gateway",
2021-07-14 09:38:35.362480 | fedora-34 |             "vpc_id": "vpc-0efab0b7d7f2deb22",
2021-07-14 09:38:35.362491 | fedora-34 |             "wait": false,
2021-07-14 09:38:35.362501 | fedora-34 |             "wait_timeout": 320
2021-07-14 09:38:35.362512 | fedora-34 |         }
2021-07-14 09:38:35.362523 | fedora-34 |     },
2021-07-14 09:38:35.362533 | fedora-34 |     "resource_actions": [
2021-07-14 09:38:35.362544 | fedora-34 |         "ec2:DescribeVpcEndpoints",
2021-07-14 09:38:35.362554 | fedora-34 |         "ec2:CreateTags",
2021-07-14 09:38:35.362579 | fedora-34 |         "ec2:DescribeTags"
2021-07-14 09:38:35.362590 | fedora-34 |     ],
2021-07-14 09:38:35.362601 | fedora-34 |     "result": {
2021-07-14 09:38:35.362611 | fedora-34 |         "creation_timestamp": "2021-07-14T09:38:21+00:00",
2021-07-14 09:38:35.362622 | fedora-34 |         "dns_entries": [],
2021-07-14 09:38:35.362633 | fedora-34 |         "groups": [],
2021-07-14 09:38:35.362658 | fedora-34 |         "network_interface_ids": [],
2021-07-14 09:38:35.362670 | fedora-34 |         "owner_id": "966509639900",
2021-07-14 09:38:35.362681 | fedora-34 |         "policy_document": "{\"Version\":\"2008-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"*\",\"Resource\":\"*\"}]}",
2021-07-14 09:38:35.362694 | fedora-34 |         "private_dns_enabled": false,
2021-07-14 09:38:35.362705 | fedora-34 |         "requester_managed": false,
2021-07-14 09:38:35.362716 | fedora-34 |         "route_table_ids": [
2021-07-14 09:38:35.362728 | fedora-34 |             "rtb-0a1d64486eed89ff2"
2021-07-14 09:38:35.362739 | fedora-34 |         ],
2021-07-14 09:38:35.362750 | fedora-34 |         "service_name": "com.amazonaws.us-east-1.s3",
2021-07-14 09:38:35.362762 | fedora-34 |         "state": "available",
2021-07-14 09:38:35.362773 | fedora-34 |         "subnet_ids": [],
2021-07-14 09:38:35.362784 | fedora-34 |         "tags": [
2021-07-14 09:38:35.362796 | fedora-34 |             {
2021-07-14 09:38:35.362807 | fedora-34 |                 "Key": "Title Case",
2021-07-14 09:38:35.362818 | fedora-34 |                 "Value": "Hello World"
2021-07-14 09:38:35.362830 | fedora-34 |             },
2021-07-14 09:38:35.362841 | fedora-34 |             {
2021-07-14 09:38:35.362852 | fedora-34 |                 "Key": "snake_case",
2021-07-14 09:38:35.362884 | fedora-34 |                 "Value": "hello_world"
2021-07-14 09:38:35.362904 | fedora-34 |             },
2021-07-14 09:38:35.362916 | fedora-34 |             {
2021-07-14 09:38:35.362928 | fedora-34 |                 "Key": "PascalCase",
2021-07-14 09:38:35.362939 | fedora-34 |                 "Value": "HelloWorld"
2021-07-14 09:38:35.362950 | fedora-34 |             },
2021-07-14 09:38:35.362961 | fedora-34 |             {
2021-07-14 09:38:35.362985 | fedora-34 |                 "Key": "lowercase spaced",
2021-07-14 09:38:35.362996 | fedora-34 |                 "Value": "hello world"
2021-07-14 09:38:35.363007 | fedora-34 |             },
2021-07-14 09:38:35.363018 | fedora-34 |             {
2021-07-14 09:38:35.363028 | fedora-34 |                 "Key": "camelCase",
2021-07-14 09:38:35.363039 | fedora-34 |                 "Value": "helloWorld"
2021-07-14 09:38:35.363050 | fedora-34 |             },
2021-07-14 09:38:35.363060 | fedora-34 |             {
2021-07-14 09:38:35.363071 | fedora-34 |                 "Key": "testPrefix",
2021-07-14 09:38:35.363082 | fedora-34 |                 "Value": "ansible-test-22865948-fedora-34-1vcpu-vexxhost-sjc1-0001636835"
2021-07-14 09:38:35.363102 | fedora-34 |             }
2021-07-14 09:38:35.363115 | fedora-34 |         ],
2021-07-14 09:38:35.363126 | fedora-34 |         "vpc_endpoint_id": "vpce-0c50cc7557a62a6c2",
2021-07-14 09:38:35.363137 | fedora-34 |         "vpc_endpoint_type": "Gateway",
2021-07-14 09:38:35.363162 | fedora-34 |         "vpc_id": "vpc-0efab0b7d7f2deb22"
2021-07-14 09:38:35.363172 | fedora-34 |     }
2021-07-14 09:38:35.363183 | fedora-34 | }
2021-07-14 09:38:35.382342 | fedora-34 |
2021-07-14 09:38:35.382370 | fedora-34 | TASK [ec2_vpc_endpoint : Assert tags would not change] *************************
2021-07-14 09:38:35.382690 | fedora-34 | task path: /home/zuul/.ansible/collections/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_endpoint/tasks/main.yml:595
2021-07-14 09:38:35.455690 | fedora-34 | fatal: [testhost]: FAILED! => {
2021-07-14 09:38:35.455758 | fedora-34 |     "assertion": "not tag_vpc_endpoint_again.changed",
2021-07-14 09:38:35.455772 | fedora-34 |     "changed": false,
2021-07-14 09:38:35.455785 | fedora-34 |     "evaluated_to": false,
2021-07-14 09:38:35.455797 | fedora-34 |     "msg": "Assertion failed"
2021-07-14 09:38:35.455808 | fedora-34 | }

See: https://85d694e5588655c6ae51-599067cbc646718c1053c6323294161f.ssl.cf5.rackcdn.com/636/067f6f84c20701ccf4bf0654471613af598c6e89/check/ansible-test-cloud-integration-aws-py36_3/624c296/job-output.txt

Issue Type

Bug Report

Component Name

ec2_vpc_endpoint

Ansible Version

$ ansible --version
2.11

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

CI

Expected Results

success

Actual Results

failure

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

ansible-zuul bot referenced this issue in ansible-collections/community.aws Jul 14, 2021
tests: disable ec2_vpc_endpoint

SUMMARY
Its test-suite fails in the CI.
See: #642
ISSUE TYPE


Bugfix Pull Request
alinabuzachis referenced this issue in alinabuzachis/community.aws Jul 19, 2021
…ec2_vpc_endpoint_6324

tests: disable ec2_vpc_endpoint

SUMMARY
Its test-suite fails in the CI.
See: #642
ISSUE TYPE


Bugfix Pull Request
alinabuzachis referenced this issue in alinabuzachis/community.aws Jul 19, 2021
…ec2_vpc_endpoint_6324

tests: disable ec2_vpc_endpoint

SUMMARY
Its test-suite fails in the CI.
See: #642
ISSUE TYPE


Bugfix Pull Request
@alinabuzachis alinabuzachis self-assigned this Aug 6, 2021
@tremble tremble transferred this issue from ansible-collections/community.aws Aug 27, 2021
@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) python3 labels Aug 27, 2021
softwarefactory-project-zuul bot pushed a commit that referenced this issue Oct 13, 2022
Re-enable ec2_vpc_endpoint tests

SUMMARY
Tests were a little broken, fixed.
Also tried splitting out the VPC cleanup code to reduce copy&paste.
fixes: #475
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_vpc_endpoint
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
Reviewed-by: Alina Buzachis <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
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
Development

Successfully merging a pull request may close this issue.

3 participants