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

Specify custom placement rule on bucket creation #2214

Open
1 task done
Turgon37 opened this issue Aug 8, 2024 · 0 comments
Open
1 task done

Specify custom placement rule on bucket creation #2214

Turgon37 opened this issue Aug 8, 2024 · 0 comments
Labels
needs_verified Some one might want to take a look at this and reproduce it to confirm

Comments

@Turgon37
Copy link

Turgon37 commented Aug 8, 2024

Summary

Ansible module amazon.aws.s3_bucket say "Compatible with AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID" but it does not allow specify custom bucket placement rule

amazon.aws.s3_bucket:
  ceph: true
  name:  test03
  state: 'present'
  region: 'default:default-placement'

....
Couldn't connect to AWS: Provided region_name 'default:default-placement' doesn't match a supported format.

Ceph RGW supports to specify placement constraint using LocationContraint S3's api field

https://docs.ceph.com/en/latest/radosgw/placement/#s3-bucket-placement

<LocationConstraint>default:new-placement</LocationConstraint>

But amazon botocore does not allow this because of region name validation https://github.com/boto/botocore/blob/7f23afdfdbcab57e319a8d86622b4f0216fc7244/botocore/utils.py#L1315

I thinks it can be difficult to change the ceph caracter separator because it need to update all ceph cluster to take into account
https://github.com/ceph/ceph/blob/08d2bd2b5efdaebc0553f4ca7bdd9d8c66423328/src/rgw/rgw_rest_s3.cc#L2521

Do you think we can ask botocore maintainer to allow disabling region name validation ?

Issue Type

Bug Report

Component Name

amazon.aws.s3_bucket

Ansible Version

ansible-playbook [core 2.12.10]
  python version = 3.9.12 (main, Apr 19 2024, 15:53:37) [GCC 12.2.0]
  jinja version = 3.1.4

Collection Versions

$ ansible-galaxy collection list
- name: community.aws
  version: 3.5.0

AWS SDK versions

Name: boto
Version: 2.49.0
Summary: Amazon Web Services Library
Home-page: https://github.com/boto/boto/
Author: Mitch Garnaat
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires: 
Required-by: 
---
Name: boto3
Version: 1.34.152
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: 
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: botocore, jmespath, s3transfer
Required-by: 
---
Name: botocore
Version: 1.34.152
Summary: Low-level, data-driven core of boto 3.
Home-page: https://github.com/boto/botocore
Author: Amazon Web Services
Author-email: 
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: jmespath, python-dateutil, urllib3
Required-by: boto3, s3transfer

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Steps to Reproduce

amazon.aws.s3_bucket:
  ceph: true
  name:  test03
  state: 'present'
  region: 'default:default-placement'

Expected Results

bucket creation

Actual Results

Couldn't connect to AWS: Provided region_name 'default:default-placement' doesn't match a supported format.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@alinabuzachis alinabuzachis added needs_verified Some one might want to take a look at this and reproduce it to confirm and removed needs_triage labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_verified Some one might want to take a look at this and reproduce it to confirm
Projects
None yet
Development

No branches or pull requests

2 participants