Skip to content

feat: Remove defaultregion#346

Merged
nolancon merged 1 commit into
linode:mainfrom
jomach:feature/removedefaultRegion
Jul 18, 2025
Merged

feat: Remove defaultregion#346
nolancon merged 1 commit into
linode:mainfrom
jomach:feature/removedefaultRegion

Conversation

@jomach
Copy link
Copy Markdown
Contributor

@jomach jomach commented Jun 26, 2025

By hardcoding the region from the config there is not way to overwrite it

With config:

apiVersion: provider-ceph.ceph.crossplane.io/v1alpha1
kind: Bucket
metadata:
  name: test-bucket
spec:
  forProvider:
    locationConstraint: eu-de-2

Error:

he authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-de-2'
  Warning  CannotCreateExternalResource  60s    managed/bucket.provider-ceph.ceph.crossplane.io  failed to create bucket: operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: tx4e88be745e434ee29ff05-00685d4b4a, HostID: tx4e88be745e434ee29ff05-00685d4b4a, api error AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-de-2'

Description of your changes

I have:

  • Run make reviewable to ensure this PR is ready for review.
  • Run make ceph-chainsaw to validate these changes against Ceph. This step is not always necessary. However, for changes related to S3 calls it is sensible to validate against an actual Ceph cluster. Localstack is used in our CI Chainsaw suite for convenience and there can be disparity in S3 behaviours betwee it and Ceph. See docs/TESTING.md for information on how to run tests against a Ceph cluster.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

@nolancon
Copy link
Copy Markdown
Collaborator

Diff check is failing due to a conflict on main which has now been resolved so I'm going to bypass the check and merge.

@nolancon nolancon merged commit 2718a6c into linode:main Jul 18, 2025
10 of 12 checks passed
nolancon added a commit that referenced this pull request Jul 18, 2025
@nolancon
Copy link
Copy Markdown
Collaborator

nolancon commented Jul 18, 2025

Diff check is failing due to a conflict on main which has now been resolved so I'm going to bypass the check and merge.

I didn't realise at the time, but this PR never ran the e2e tests. I merged because I thought the diff check was the only test failing 🙃. But it turns out removing the default region entirely causes the following error which prevents bucket provisioning:

 create failed: failed to create bucket: operation error S3: CreateBucket,
      failed to resolve service endpoint, endpoint rule error, A region must be
        set when sending requests to S3.

So I'm reverting this change here #350. I still agree that the default region should not be hard coded like this, but we need a better way of being able to set it while keeping the default.

nolancon added a commit that referenced this pull request Jul 18, 2025
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.

2 participants