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

fix: remove default value for accelerate_enabled variable #2212

Closed

Conversation

rvalab
Copy link

@rvalab rvalab commented Aug 6, 2024

SUMMARY

Remove default value for accelerate_enabled variable.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

amazon.aws.s3_bucket

ADDITIONAL INFORMATION

Starting version 8.1.0, module execution failed on NetApp StorageGRID systems.

...
TASK [Create Bucket and Apply Bucket Policy] ************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (XNotImplemented) when calling the GetBucketAccelerateConfiguration operation: The request you provided implies functionality that is not implemented.
fatal: [localhost]: FAILED! => {"boto3_version": "1.34.154", "botocore_version": "1.34.154", "changed": false, "error": {"code": "XNotImplemented", "message": "The request you provided implies functionality that is not implemented.", "resource": "/my-bucket?accelerate"}, "msg": "Fetching bucket transfer acceleration state is not supported: An error occurred (XNotImplemented) when calling the GetBucketAccelerateConfiguration operation: The request you provided implies functionality that is not implemented.", "response_metadata": {"host_id": "12329880", "http_headers": {"connection": "CLOSE", "content-length": "253", "content-type": "application/xml", "date": "Tue, 06 Aug 2024 11:51:52 GMT", "server": "StorageGRID/11.8.0.5", "x-amz-id-2": "12329880", "x-amz-request-id": "1722945112091352", "x-ntap-sg-trace-id": "53350fe8388e570f"}, "http_status_code": 501, "request_id": "1722945112091352", "retry_attempts": 0}}
...

This is because there is a default value set to accelerate_enabled variable.
With this default value, condition in line 956 (if accelerate_enabled is not None:) is always true and the module failed even if the functionality is not implemented in StorageGRID systems.

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/29a8776e2ae140e1bd8e33441bec7778

✔️ ansible-galaxy-importer SUCCESS in 4m 50s
✔️ build-ansible-collection SUCCESS in 10m 32s
✔️ ansible-test-splitter SUCCESS in 4m 19s
✔️ integration-amazon.aws-1 SUCCESS in 6m 59s
Skipped 43 jobs

@alinabuzachis
Copy link
Collaborator

@rvalab Does this PR #2194 solve your issue or your patch is still needed?

@alinabuzachis alinabuzachis added this to the 8.2.0 milestone Aug 22, 2024
@rvalab
Copy link
Author

rvalab commented Aug 23, 2024

@alinabuzachis #2194 not but #2222 fixed my issue.

@tremble
Copy link
Contributor

tremble commented Aug 28, 2024

@rvalab many thanks for taking the time to submit this PR.

I'm sorry I missed your PR when submitting mine: I saw #2220 come through and knew what the issue would be and totally missed that you'd already started on a fix. If you take a look at #2222 you can see there are a couple of extra steps that would have been needed on this PR:

  • A changelog fragment
  • The docs needed to be updated

Additionally, the set/unset code should generally check for "None" (which unfortunately didn't happen with the original PR), and not automatically disable things which may have been manually set while the module didn't support them.

@tremble tremble closed this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants