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_peer - idempotency + integration tests #501

Merged
merged 14 commits into from
Apr 6, 2021

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Mar 25, 2021

SUMMARY
  • Add integration tests for ec2_vpc_peer
  • Fix idempotency for rejecting / deleting connections
ISSUE TYPE
  • Bugfix Pull Request
  • Tests Pull Request
COMPONENT NAME

ec2_vpc_peer
ec2_vpc_peering_info

ADDITIONAL INFORMATION

@tremble
Copy link
Contributor Author

tremble commented Mar 25, 2021

Depends-On: mattclay/aws-terminator#141

@ansibullbot
Copy link

@ansibullbot ansibullbot added WIP Work in progress bug This issue/PR relates to a bug integration tests/integration module module needs_triage plugins plugin (any type) tests tests labels Mar 25, 2021
@tremble tremble changed the title [WIP] ec2_vpc_peer - idempotency + integration tests ec2_vpc_peer - idempotency + integration tests Mar 29, 2021
@ansibullbot
Copy link

@ansibullbot ansibullbot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed WIP Work in progress labels Mar 29, 2021
@tremble
Copy link
Contributor Author

tremble commented Apr 3, 2021

@alinabuzachis if you get chance please could you take a look at this one. Mostly just tests but gives #355 a basis to work off of for the test suite

@ansibullbot ansibullbot added community_review and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Apr 3, 2021
Copy link
Contributor

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tremble tremble merged commit c20b102 into ansible-collections:main Apr 6, 2021
@tremble tremble deleted the tests/ec2_vpc_peer branch June 29, 2021 12:58
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 16, 2021
…lections#501)

* Add minimal integration tests for ec2_vpc_peer

* Add Retries to VPC Peering

* Fix idempotency when deleting connections

* Fix idempotency when after rejecting peering connections

* Test for updating tags

* Add first round of assertions (changed/successful)

* Add docs about ec2_vpc_peering_info return values

* Make sure Peering IDs are consistent

* docs update

* Initial tests for ec2_vpc_peering_info results

* Use ansible_dict_to_boto3_filter_list

* Add support for waiting on state changes

* Assert shape of results when searching based on status code

* changelog

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@c20b102
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
* Add minimal integration tests for ec2_vpc_peer

* Add Retries to VPC Peering

* Fix idempotency when deleting connections

* Fix idempotency when after rejecting peering connections

* Test for updating tags

* Add first round of assertions (changed/successful)

* Add docs about ec2_vpc_peering_info return values

* Make sure Peering IDs are consistent

* docs update

* Initial tests for ec2_vpc_peering_info results

* Use ansible_dict_to_boto3_filter_list

* Add support for waiting on state changes

* Assert shape of results when searching based on status code

* changelog
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
* Add minimal integration tests for ec2_vpc_peer

* Add Retries to VPC Peering

* Fix idempotency when deleting connections

* Fix idempotency when after rejecting peering connections

* Test for updating tags

* Add first round of assertions (changed/successful)

* Add docs about ec2_vpc_peering_info return values

* Make sure Peering IDs are consistent

* docs update

* Initial tests for ec2_vpc_peering_info results

* Use ansible_dict_to_boto3_filter_list

* Add support for waiting on state changes

* Assert shape of results when searching based on status code

* changelog
danielcotton pushed a commit to danielcotton/community.aws that referenced this pull request Nov 23, 2021
* Add minimal integration tests for ec2_vpc_peer

* Add Retries to VPC Peering

* Fix idempotency when deleting connections

* Fix idempotency when after rejecting peering connections

* Test for updating tags

* Add first round of assertions (changed/successful)

* Add docs about ec2_vpc_peering_info return values

* Make sure Peering IDs are consistent

* docs update

* Initial tests for ec2_vpc_peering_info results

* Use ansible_dict_to_boto3_filter_list

* Add support for waiting on state changes

* Assert shape of results when searching based on status code

* changelog
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
…ollections#501)

ec2_eni - Increase timeout when waiting for ENIs to detach

SUMMARY
Increase timeout when waiting for ENIs to detach
https://796bc2ffb2f08daedb4f-dfd1c589d70cb07166ffb8939d1c9bb5.ssl.cf2.rackcdn.com/500/50b47988590728b63925dd979fc5a83a15e40a06/gate/ansible-test-cloud-integration-aws-py36_0/4c3a4d5/job-output.txt
Logs show that the ENI was in the 'detaching' state, implying that our default 40*5 second retries were insufficient
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_eni
ADDITIONAL INFORMATION
Logs show that the ENI had entered a 'detaching' state:
2021-09-14 11:44:06.593046 | fedora-34 |         {
2021-09-14 11:44:06.593054 | fedora-34 |             "attachment": {
2021-09-14 11:44:06.593061 | fedora-34 |                 "attach_time": "2021-09-14T11:40:16+00:00",
2021-09-14 11:44:06.593069 | fedora-34 |                 "attachment_id": "eni-attach-09bb047d2f0f5f293",
2021-09-14 11:44:06.593100 | fedora-34 |                 "delete_on_termination": false,
2021-09-14 11:44:06.593110 | fedora-34 |                 "device_index": 1,
2021-09-14 11:44:06.593118 | fedora-34 |                 "instance_id": "i-0db09d037e72f7e33",
2021-09-14 11:44:06.593127 | fedora-34 |                 "instance_owner_id": "966509639900",
2021-09-14 11:44:06.593135 | fedora-34 |                 "network_card_index": 0,
2021-09-14 11:44:06.593143 | fedora-34 |                 "status": "detaching"
2021-09-14 11:44:06.593151 | fedora-34 |             },
2021-09-14 11:44:06.593160 | fedora-34 |             "availability_zone": "us-east-1a",
2021-09-14 11:44:06.593168 | fedora-34 |             "description": "",
2021-09-14 11:44:06.593176 | fedora-34 |             "groups": [
2021-09-14 11:44:06.593184 | fedora-34 |                 {
2021-09-14 11:44:06.593193 | fedora-34 |                     "group_id": "sg-0e140a452ed923a71",
2021-09-14 11:44:06.593201 | fedora-34 |                     "group_name": "default"
2021-09-14 11:44:06.593209 | fedora-34 |                 }
2021-09-14 11:44:06.593217 | fedora-34 |             ],
2021-09-14 11:44:06.593226 | fedora-34 |             "id": "eni-0a4e0246ce3fe9245",
2021-09-14 11:44:06.593234 | fedora-34 |             "interface_type": "interface",
2021-09-14 11:44:06.593242 | fedora-34 |             "ipv6_addresses": [],
2021-09-14 11:44:06.593250 | fedora-34 |             "mac_address": "12:fe:a9:4f:34:c7",
2021-09-14 11:44:06.593258 | fedora-34 |             "network_interface_id": "eni-0a4e0246ce3fe9245",
2021-09-14 11:44:06.593266 | fedora-34 |             "owner_id": "966509639900",
2021-09-14 11:44:06.593275 | fedora-34 |             "private_dns_name": "ip-10-254-241-132.ec2.internal",
2021-09-14 11:44:06.593283 | fedora-34 |             "private_ip_address": "10.254.241.132",
2021-09-14 11:44:06.593291 | fedora-34 |             "private_ip_addresses": [
2021-09-14 11:44:06.593306 | fedora-34 |                 {
2021-09-14 11:44:06.593315 | fedora-34 |                     "primary": true,
2021-09-14 11:44:06.593337 | fedora-34 |                     "private_dns_name": "ip-10-254-241-132.ec2.internal",
2021-09-14 11:44:06.593345 | fedora-34 |                     "private_ip_address": "10.254.241.132"
2021-09-14 11:44:06.593353 | fedora-34 |                 }
2021-09-14 11:44:06.593361 | fedora-34 |             ],
2021-09-14 11:44:06.593370 | fedora-34 |             "requester_id": "AROAIUOWG2JZBBCEMK7M2:dev=remote=zuul-cloud",
2021-09-14 11:44:06.593378 | fedora-34 |             "requester_managed": false,
2021-09-14 11:44:06.593399 | fedora-34 |             "source_dest_check": true,
2021-09-14 11:44:06.593407 | fedora-34 |             "status": "in-use",
2021-09-14 11:44:06.593414 | fedora-34 |             "subnet_id": "subnet-09d5010acb57dfa83",
2021-09-14 11:44:06.593422 | fedora-34 |             "tag_set": {},
2021-09-14 11:44:06.593429 | fedora-34 |             "tags": {},
2021-09-14 11:44:06.593437 | fedora-34 |             "vpc_id": "vpc-0b9f195f029ca4f69"
2021-09-14 11:44:06.593458 | fedora-34 |         },

Amazon are sometimes just 'slow', if our tests show a 30% failure rate, then better to wait longer, this is probably hitting users.

Reviewed-by: Jill R <None>
Reviewed-by: None <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 community_review integration tests/integration module module needs_triage plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants