community.aws icon indicating copy to clipboard operation
community.aws copied to clipboard

Add ResourceType on ec2 snapshot copy

Open bplaxco opened this issue 2 years ago • 9 comments

SUMMARY

Fixes this issue that shows up when tags are specified:

An error occurred waiting for the snapshot to become available.: An
error occurred (InvalidParameterValue) when calling the CopySnapshot
operation: Tag specification resource type must have a value
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_snapshot_copy

ADDITIONAL INFORMATION
# before

botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the CopySnapshot operation: Tag specification resource type must have a value                              
fatal: [localhost]: FAILED! => {                                                                                                                                                                   
    "boto3_version": "1.24.57",                                                                                                                                                                    
    "botocore_version": "1.27.58",                                                                                                                                                                 
    "changed": false,                                                                                                                                                                              
    "error": {                                                                                                                                                                                     
        "code": "InvalidParameterValue",                                                                                                                                                           
        "message": "Tag specification resource type must have a value"                                                                                                                             
    },  
....


# after  (no error message)

changed: [localhost] => {                                                                                                                                                                          
    "changed": true,                                                                                                                                                                               
    "invocation": {                                                                                                                                                                                
        "module_args": {       
.....

bplaxco avatar Aug 24 '22 16:08 bplaxco

cc @Deepakkothandan @jillr @markuman @s-hertel @tremble click here for bot help

ansibullbot avatar Aug 24 '22 16:08 ansibullbot

Build succeeded.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 31s :heavy_check_mark: build-ansible-collection SUCCESS in 5m 13s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 9m 00s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 10m 17s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 44s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 04s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 6m 59s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 6m 08s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 34s :warning: integration-community.aws-1 SKIPPED :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

Changelog fragment added.

Looking into the tests.

bplaxco avatar Sep 02 '22 16:09 bplaxco

Build succeeded.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 11s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 57s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 10m 12s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 10m 19s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 12s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 19s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 6m 31s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 5m 38s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 45s :warning: integration-community.aws-1 SKIPPED :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

Build failed.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 12s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 57s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 9m 43s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 11m 56s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 59s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 11m 02s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 6m 42s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 6m 57s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 34s :x: integration-community.aws-1 FAILURE in 6m 03s :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

Build failed.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 08s :heavy_check_mark: build-ansible-collection SUCCESS in 5m 30s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 10m 25s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 10m 30s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 48s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 18s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 5m 54s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 6m 20s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 29s :x: integration-community.aws-1 FAILURE in 6m 40s :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

@tremble in the zuul ouput I get:

    "error": {
        "code": "UnauthorizedOperation",
        "message": "You are not authorized to perform this operation. Encoded authorization failure message: SZOho26QkeN31KcOxBTUnC_sBSeRa3G9qqAmqJOLtkkAiUvLcOIlJVojSNLkyZa7MXEHWbTOAtc5aemsWR_tKiqEZtwr5OlwXk4PbtKTtj0NdpDaBeDs1q-Mpt7zDktDjJmk41tSPe-Rjjqe1ftFJhuZ76rQKHOXEeLol1QsaW2kA9x74EEf6gbr13kMUi2CyF3D-XTFMLkpZj-XShxzE9QbF1xvmnvwxIbmwuVk0PWFUX8dKbQbeB4K_jSCBLIV5Ag3Rio0Foc4h6uYfBmTz_vOR7J2ukyrRdgn5dwIc_78jFpa2DSqPa93EbGXeXjW6fTtzFvsExeRynD7-QBDY4iZEYGE2inBGZHZO7elmhh4Ie9G-xV6g2hBZVlWShrDzxGoJjanOiqTxl3530TxVRO-YO3kIzDbG55DouvtyOGdJyQntxyeIB2eR0gZhI5maCAcsD2YODtRyhwIDIXhGiBKmB4GmZ90ZgfQ0zHkLf4aLr5xxZcpeqf3juVUpMUMdOIWQ_VIdldVmPvx13e4FrsVACt4509Uh1vt5R7N-vX6YSh5g9CDrJ8"
    }

The module args passed in to ec2_snapshot_copy seem legit from what I know about the module, would someone be able to take a look and confirm the service account used has the right permissions? Or would you rather me mark the tests as disabled or something like that?

bplaxco avatar Sep 02 '22 18:09 bplaxco

@tremble

I went ahead and removed the tests to get the MR through since they were marked as optional, but since they seemed to be failing because of a permission issue with the service account running them, I kept them in the history[1] in case we want to pull them back in.

Feel free to ping me on gchat at work if you'd like to sync up on getting the test running ^_^

[1] The tests are still on aec7b2fd397337fced67d9b4846fbeed74db61cc

bplaxco avatar Sep 14 '22 22:09 bplaxco

Build succeeded.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 47s :heavy_check_mark: build-ansible-collection SUCCESS in 5m 03s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 12m 08s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 9m 17s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 34s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 52s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 6m 01s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 7m 14s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 33s :warning: integration-community.aws-1 SKIPPED :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED :warning: integration-community.aws-14 SKIPPED :warning: integration-community.aws-15 SKIPPED :warning: integration-community.aws-16 SKIPPED :warning: integration-community.aws-17 SKIPPED :warning: integration-community.aws-18 SKIPPED

Hey @tremble just wanted to see if you need anything else from me on this ^_^

bplaxco avatar Nov 08 '22 19:11 bplaxco

@bplaxco sorry about the delay here. LGTM

tremble avatar Nov 25 '22 11:11 tremble

Build succeeded (gate pipeline).

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 59s :heavy_check_mark: build-ansible-collection SUCCESS in 5m 27s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 9m 51s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 8m 13s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 09s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 04s :heavy_check_mark: ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 34s :heavy_check_mark: ansible-test-units-amazon-aws-python36 SUCCESS in 6m 04s :heavy_check_mark: ansible-test-units-amazon-aws-python38 SUCCESS in 5m 48s :heavy_check_mark: ansible-test-units-amazon-aws-python39 SUCCESS in 5m 55s :heavy_check_mark: ansible-test-changelog SUCCESS in 2m 09s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 59s :warning: integration-community.aws-1 SKIPPED :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED :warning: integration-community.aws-14 SKIPPED :warning: integration-community.aws-15 SKIPPED :warning: integration-community.aws-16 SKIPPED :warning: integration-community.aws-17 SKIPPED :warning: integration-community.aws-18 SKIPPED :warning: integration-community.aws-19 SKIPPED :warning: integration-community.aws-20 SKIPPED :warning: integration-community.aws-21 SKIPPED :warning: integration-community.aws-22 SKIPPED

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/fad358924d91150b6278a7832c2f2028d588bd44/pr-1419

Backported as https://github.com/ansible-collections/community.aws/pull/1605

🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.

patchback[bot] avatar Nov 25 '22 11:11 patchback[bot]

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

github-actions[bot] avatar Nov 25 '22 11:11 github-actions[bot]