Skip to content

Ceph Object Store: Use "us-east-1" as the default signing region to avoid setting location constraint#12285

Merged
DaanHoogland merged 1 commit intoapache:4.20from
shapeblue:ceph-loc-constraint
Jan 12, 2026
Merged

Ceph Object Store: Use "us-east-1" as the default signing region to avoid setting location constraint#12285
DaanHoogland merged 1 commit intoapache:4.20from
shapeblue:ceph-loc-constraint

Conversation

@abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Dec 18, 2025

Description

Fixes #12130

        AmazonS3 client = AmazonS3ClientBuilder.standard()
                .enablePathStyleAccess()
                .withCredentials(
                        new AWSStaticCredentialsProvider(
                                new BasicAWSCredentials(accessKey, secretKey)))
                .withEndpointConfiguration(
                        new AwsClientBuilder.EndpointConfiguration(url, "auto"))
                .build();

Using "auto" as the signingRegion in AwsClientBuilder forces the s3 client to infer region from the url and set it as LocationConstraint while sending the request which is not required for ceph and causes the issue The specified location-constraint is not valid

In PR #10772, the signing_region was changed to null which avoids setting location constraint for some endpoints but not all.
Setting the signing_region as "us-east-1" fixes it for all endpoints as the AWSClient SDK treats "us-east-1" as default and doesn't set any location constraints.

The table below describes what happens to createBucket with different endpoints and signing_regions.

signing_region →
endpoint ↓
"auto" null "us-east-1"
s3.amazonaws.com error pass pass
s3.us-east-1.amazonaws.com error pass pass
s3.testdomain.com error error pass
s3.us-east-1.testdomain.com error pass pass
test.testdomain.com pass pass pass
s3.amazonaws.testdomain.com error error pass
s3.testdomain.amazonaws.com error error pass

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested createBucket with different endpoints and signing_regions.

signing_region →
endpoint ↓
"auto" null "us-east-1"
s3.amazonaws.com error pass pass
s3.us-east-1.amazonaws.com error pass pass
s3.testdomain.com error error pass
s3.us-east-1.testdomain.com error pass pass
test.testdomain.com pass pass pass
s3.amazonaws.testdomain.com error error pass
s3.testdomain.amazonaws.com error error pass

Tested other bucket lifecycles as well.

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.22%. Comparing base (ba26d95) to head (ca3f33f).
⚠️ Report is 22 commits behind head on 4.20.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12285      +/-   ##
============================================
- Coverage     16.22%   16.22%   -0.01%     
- Complexity    13358    13360       +2     
============================================
  Files          5657     5657              
  Lines        498692   498692              
  Branches      60530    60530              
============================================
- Hits          80932    80920      -12     
- Misses       408738   408743       +5     
- Partials       9022     9029       +7     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.08% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default come from pool or global setting instead of being hard-coded ?

@yadvr yadvr requested a review from wido December 18, 2025 05:33
@wido
Copy link
Contributor

wido commented Dec 18, 2025

LGTM

@abh1sar
Copy link
Collaborator Author

abh1sar commented Dec 18, 2025

Thanks for the quick review.

Should the default come from pool or global setting instead of being hard-coded ?

I don't think we'll need any other value apart from "us-east-1"

@abh1sar
Copy link
Collaborator Author

abh1sar commented Dec 18, 2025

@blueorangutan package

@blueorangutan
Copy link

@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16082

@shwstppr
Copy link
Contributor

@abh1sar this is marked ready for merge but I don't see a smoke test run, should we run one?

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@abh1sar
Copy link
Collaborator Author

abh1sar commented Jan 12, 2026

@abh1sar this is marked ready for merge but I don't see a smoke test run, should we run one?

@shwstppr This is a one line change and smoke tests will not cover ceph object store provider code.

@DaanHoogland DaanHoogland merged commit c7cfeb5 into apache:4.20 Jan 12, 2026
25 checks passed
@abh1sar abh1sar deleted the ceph-loc-constraint branch January 12, 2026 08:16
@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16332

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants