Please allow configuration of rgw_relaxed_s3_bucket_names option

Bug #1926498 reported by James Troup
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceph RADOS Gateway Charm
Fix Committed
Wishlist
Ethan Myers

Bug Description

We just ran the following on ProdStack 5

juju config ceph-radosgw config-flags='{"client.radosgw.gateway": {"rgw_relaxed_s3_bucket_names": "true"}}'

Per the config help, we're filing a bug to ask for a proper config setting so we don't have to use config-flags.

IS want this because they're migrating from Swift (PS4½) to Ceph RadosGW (PS5) - they can probably provide more specifics if needed.

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Thanks for filing this enhancement and for helping to make the charms better. I am triaging this as wishlist.

tags: added: onboarding
Changed in charm-ceph-radosgw:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Drew Freiberger (afreiberger) wrote :

When implementing this change with config-flags, the implementation of config-flags seems to have failed to create a new section per the config-flags definition:

juju config ceph-radosgw config-flags='{"client.radosgw.gateway": {"rgw_relaxed_s3_bucket_names": "true"}}'

The /etc/ceph/config file has the following three extra lines from this config change:

# The following are user-provided options provided via the config-flags charm option.
# User-provided [client.radosgw.gateway] section config
rgw_relaxed_s3_bucket_names = true

Expected result would be these two lines (plus any juju comments):
[client.radosgw.gateway]
rgw_relaxed_s3_bucket_names = true

Note the lack of DEFINING the [client.radosgw.gateway] section of the file.

root@juju-733f2f-4-lxd-12:/etc/ceph# grep '\[' ceph.conf
[global]
[client.rgw.juju-733f2f-4-lxd-12]
# User-provided [client.radosgw.gateway] section config

Revision history for this message
Billy Olsen (billy-olsen) wrote :

It may seem a bit confusing, but where radosgw runs via systemd rather than upstart - the client id is actually rgw.<hostname>. The charm provides a convenience of mapping client.radosgw.gateway (legacy client id) into the new client id mapping transparently. Thus, when specifying client.radosgw.gateway it will be mapped the the client.rgw.<hostname> section itself.

As such, this setting applies properly to the ceph.conf. You can audit this by using the admin socket like so:

# The current values of the rgw service
root@juju-504a16-zaza-fc8300987aa2-7:/etc/ceph# ceph daemon /var/run/ceph/ceph-client.rgw.juju-504a16-zaza-fc8300987aa2-7.376436.93842140922864.asok config get rgw_relaxed_s3_bucket_names
{
    "rgw_relaxed_s3_bucket_names": "true"
}

Where the admin socket name will actually vary, but will be in the /var/run/ceph directory.

Revision history for this message
Drew Freiberger (afreiberger) wrote :

Specifically, enabling this setting is not allowing for 2 letter bucket names such as "dr" or "tl".

Revision history for this message
Billy Olsen (billy-olsen) wrote :

The rgw_relaxed_s3_bucket_names option does not affect the minimum length of bucket names (3). That option allows you to have a bucket name longer (255 chars) than the default (63 chars).

Revision history for this message
Billy Olsen (billy-olsen) wrote :

FWIW, the rgw_relaxed_s3_bucket_names setting allows for:

1. longer bucket names
2. upper case letters in bucket names
3. bucket names starting with _, . or -
4. bucket names containing an _
5. consecutive . or - characters
6. bucket names ending with a non-alphanumeric character

But only in the case that the s3 protocol is used to access the buckets.

tags: added: good-first-bug
tags: removed: onboarding
Ethan Myers (ethanmyers)
Changed in charm-ceph-radosgw:
assignee: nobody → Ethan Myers (ethanmyers)
Ethan Myers (ethanmyers)
Changed in charm-ceph-radosgw:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-radosgw (master)

Reviewed: https://review.opendev.org/c/openstack/charm-ceph-radosgw/+/841797
Committed: https://opendev.org/openstack/charm-ceph-radosgw/commit/2bda1f68a6aa996cf4f8992bfe8bf7ebaa13a9c0
Submitter: "Zuul (22348)"
Branch: master

commit 2bda1f68a6aa996cf4f8992bfe8bf7ebaa13a9c0
Author: Ethan Myers <email address hidden>
Date: Fri May 13 14:14:29 2022 -0600

    Add a config option for relaxed s3 bucket names.

    Closes-Bug: #1926498
    Change-Id: I4b329f3327a0e91ccd9f65841cc5d62736918a85

Changed in charm-ceph-radosgw:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.