Skip to content

"The endpoint must not prefixed with the bucket name" error when bucket name matches beginning of S3 endpoint #9177

Open
@JustinLex

Description

@JustinLex

Describe the bug

An undocumented consequence of PR #3414 is that users are not allowed to use a bucket name that matches the first subdomain on an s3 endpoint.

To Reproduce

I am using Ceph RGW to create an S3-compatible object gateway at mimir.rgw.jlh.name and a bucket named mimir. This bucket can be accessed at mimir.mimir.rgw.jlh.name or mimir.rgw.jlh.name/mimir. I use multiple RGW gateway, as different buckets may have different Ceph storage pool requirements. (e.g. ssd vs hdd)

I have configured mimir to use this bucket, but Mimir crashes with the error "error validating config: invalid rulestore config: the endpoint must not prefixed with the bucket name".

common:
    storage:
      backend: s3
      s3:
        bucket_name: "mimir"
        endpoint: "mimir.rgw.jlh.name"
        access_key_id: "${AWS_ACCESS_KEY_ID}"
        secret_access_key: "${AWS_SECRET_ACCESS_KEY}"
  blocks_storage:
      storage_prefix: blocks
  alertmanager_storage:
      storage_prefix: alertmanager
  ruler_storage:
      storage_prefix: ruler

Expected behavior

This check breaks an otherwise valid configuration, which can be a minor annoyance for users. Perhaps it should should be removed or documentation should be added.

Environment

  • Infrastructure: Kubernetes
  • Deployment tool: mimir-distributed helm

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomerstype/docsImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions