boto3 icon indicating copy to clipboard operation
boto3 copied to clipboard

Storagegateway create-tape-with-barcode ignores Tags directive

Open dabiged opened this issue 3 years ago • 7 comments

Describe the bug When I create a tape in a storage gateway with barcode, I can specify the tags associated with that tape. When the tape is created, these tags are ignored and the tape is created with an empty list for tags. This occurs in boto3==1.20.14 and awscli

Steps to reproduce

Below are AWSCLI commands. Result is the same in boto3.

  1. Have a running gateway.
  2. Create a tape with tags
aws storagegateway create-tape-with-barcode --gateway-arn "arn:aws:storagegateway:ap-southeast-2:<redacted>:gateway/sgw-XXXXXXXX" --tape-size-in-bytes $((200*1024*1024*1024)) --tape-barcode "TESTTAG1" --tags Key='TESTKEY',Value='TESTVALUE'
{
    "TapeARN": "arn:aws:storagegateway:ap-southeast-2:<redacted>:tape/TESTTAG1"
}
  1. Tags are not there.
 aws storagegateway list-tags-for-resource --resource-arn arn:aws:storagegateway:ap-southeast-2:<redacted>:tape/TESTTAG1
{
    "Tags": [],
    "ResourceARN": "arn:aws:storagegateway:ap-southeast-2:<redacted>:tape/TESTTAG1"
}

  1. A workaround is to make a second call using add-tags-to-resource, however due to constraints from the client I cannot use for this project.

Expected behavior I would expect that the list of tags passed to the create-tape-with-barcode call should populate that objects tags.

Debug logs N/A

dabiged avatar Dec 07 '21 08:12 dabiged

Hi @dabiged,

Thanks for the report. In order to help further, I need to see what request is being sent for the create-tape-with-barcode and the response for list-tags-for-resource.

Can you please provide debug logs from either the CLI (using the --debug parameter), or from boto3 (by adding boto3.set_stream_logger('')) to your code? Please sanitize/redact any sensitive information.

kdaily avatar Dec 07 '21 19:12 kdaily

Logs are attached. I have redacted sensitive (or not sensitive) details.

createtape_debug.txt listtags.txt

dabiged avatar Dec 09 '21 08:12 dabiged

Checking in as there hasn't been an update here in a while. @dabiged is this still an issue? If so then we would likely need to follow the same process as in this related issue: https://github.com/boto/boto3/issues/3413#issuecomment-1243992262, as the problem resides in the service API rather than boto3 directly.

tim-finnigan avatar Nov 17 '22 22:11 tim-finnigan

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

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

I will check it today and get back to you.

dabiged avatar Nov 22 '22 23:11 dabiged

Hi @tim-finnigan,

I have just checked on aws-cli/2.8.13 Python/3.9.11 Linux/5.4.0-132-generic and the issue is still there.

dabiged avatar Nov 25 '22 11:11 dabiged

Thanks for confirming - as this relates to service API, I created a new issue for tracking this here in our cross-SDK repository: https://github.com/boto/boto3/issues/3089. Please refer to that issues for updates going forward and for escalating these kinds of issues you can also consider reaching out through AWS Support.

tim-finnigan avatar Nov 26 '22 21:11 tim-finnigan