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

[PR #606/038c0474 backport][stable-1.5] ec2_vol: set iops even if unchanged for boto req #614

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jan 14, 2022

Depends-On: #753

This is a backport of PR #606 as merged into main (038c047).

SUMMARY

Set the iops value in req_obj even if the target iops is the same as the existing. This is a required parameter for boto's modify_volume. Fixes #605

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_vol

ec2_vol: set iops even if unchanged for boto req

SUMMARY

Set the iops value in req_obj even if the target iops is the same as the existing. This is a required parameter for boto's modify_volume. Fixes #605
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_vol

Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
(cherry picked from commit 038c047)
@lowlydba
Copy link
Contributor

recheck

@lowlydba
Copy link
Contributor

lowlydba commented Jan 18, 2022

failures are unrelated to change, looks like CI issues

@jillr
Copy link
Collaborator

jillr commented Jan 21, 2022

recheck

@jillr
Copy link
Collaborator

jillr commented Jan 21, 2022

we fixed a few CI things earlier today, hopefully that helps

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels Jan 27, 2022
@alinabuzachis
Copy link
Contributor

recheck

@alinabuzachis
Copy link
Contributor

recheck

@alinabuzachis
Copy link
Contributor

recheck

@gravesm
Copy link
Member

gravesm commented Feb 17, 2022

It looks like there are a few changes that will need to be applied to the stable-1.5 branch before this can be merged. #404, or at least portions of it, like constraints.txt, should be ported to this branch, though I guess the versions should be changed. Also, it looks like there are some new sanity errors for what I assume is the milestone build of ansible. These seem to be in code that was removed in version 2, so we'll have to address those.

@tremble
Copy link
Contributor

tremble commented Apr 12, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@ansibullbot ansibullbot added integration tests/integration tests tests and removed small_patch Hopefully easy to review labels Apr 12, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@tremble
Copy link
Contributor

tremble commented Apr 12, 2022

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Apr 12, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 2a4e9f0 into stable-1.5 Apr 12, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-1.5/038c0474ea01d274e0c46fe1f1e2e77769624bff/pr-606 branch April 12, 2022 12:45
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
…_vpc_peer

Add NotFound retries when tagging a new VPC Peering connection

SUMMARY
Prior to botocore 1.17.24 it wasn't possible to tag the connection as a part of the creation call.  As such a separate create_tags call is performed after the creation.  However, this leads to a race condition when "I(wait=False)".
Rather than adding hard to test logic, add InvalidVpcPeeringConnectionID.NotFound retries to the tagging.
Also move from custom tag handling code over to the shared code in ansible_collections.amazon.aws.plugins.module_utils.ec2
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_vpc_peer
ADDITIONAL INFORMATION
TASK [ec2_vpc_peer : Create local account VPC peering Connection] **************
task path: /home/zuul/.ansible/collections/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_peer/tasks/main.yml:403
<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-1624925621.1931164-8629-186765425497910 `" && echo ansible-tmp-1624925621.1931164-8629-186765425497910="` echo /home/zuul/.ansible/tmp/ansible-tmp-1624925621.1931164-8629-186765425497910 `" ) && sleep 0'
Using module file /home/zuul/.ansible/collections/ansible_collections/community/aws/plugins/modules/ec2_vpc_peer.py
<testhost> PUT /home/zuul/.ansible/tmp/ansible-local-8151h1f3kbcc/tmplyozom8u TO /home/zuul/.ansible/tmp/ansible-tmp-1624925621.1931164-8629-186765425497910/AnsiballZ_ec2_vpc_peer.py
<testhost> EXEC /bin/sh -c 'chmod u+x /home/zuul/.ansible/tmp/ansible-tmp-1624925621.1931164-8629-186765425497910/ /home/zuul/.ansible/tmp/ansible-tmp-1624925621.1931164-8629-186765425497910/AnsiballZ_ec2_vpc_peer.py && sleep 0'
<testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /home/zuul/venv/bin/python3.6 /home/zuul/.ansible/tmp/ansible-tmp-1624925621.1931164-8629-186765425497910/AnsiballZ_ec2_vpc_peer.py && sleep 0'
<testhost> EXEC /bin/sh -c 'rm -f -r /home/zuul/.ansible/tmp/ansible-tmp-1624925621.1931164-8629-186765425497910/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
  File "/tmp/ansible_ec2_vpc_peer_payload_bbdh2ojz/ansible_ec2_vpc_peer_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_peer.py", line 559, in create_tags
  File "/tmp/ansible_ec2_vpc_peer_payload_bbdh2ojz/ansible_ec2_vpc_peer_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/core.py", line 288, in deciding_wrapper
    return retrying_wrapper(*args, **kwargs)
  File "/tmp/ansible_ec2_vpc_peer_payload_bbdh2ojz/ansible_ec2_vpc_peer_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 154, in retry_func
    raise e
  File "/tmp/ansible_ec2_vpc_peer_payload_bbdh2ojz/ansible_ec2_vpc_peer_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 144, in retry_func
    return f(*args, **kwargs)
  File "/home/zuul/venv/lib/python3.6/site-packages/botocore/client.py", line 386, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/zuul/venv/lib/python3.6/site-packages/botocore/client.py", line 705, in _make_api_call
    raise error_class(parsed_response, operation_name)
fatal: [testhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "aws_access_key": "ASIA6CCDWXDOPPPI445H",
            "aws_ca_bundle": null,
            "aws_config": null,
            "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "debug_botocore_endpoint_logs": true,
            "ec2_url": null,
            "peer_owner_id": null,
            "peer_region": null,
            "peer_vpc_id": "vpc-0deec00ddeb3584bf",
            "peering_id": null,
            "profile": null,
            "region": "us-east-1",
            "security_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "state": "present",
            "tags": {
                "Name": "Peering connection for VPC vpc-018bc7cc64b0731f9 to VPC vpc-0deec00ddeb3584bf"
            },
            "validate_certs": true,
            "vpc_id": "vpc-018bc7cc64b0731f9",
            "wait": false
        }
    },
    "msg": "An error occurred (InvalidVpcPeeringConnectionID.NotFound) when calling the CreateTags operation: The vpcPeeringConnection ID 'pcx-06ed26ea8993aba5b' does not exist",
    "resource_actions": [
        "ec2:DeleteTags",
        "ec2:CreateTags",
        "ec2:CreateVpcPeeringConnection",
        "ec2:DescribeVpcPeeringConnections"
    ]
}

Reviewed-by: Alina Buzachis <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 mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants