You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "abh1sar (via GitHub)" <gi...@apache.org> on 2025/04/24 12:09:13 UTC

[PR] Ceph object store: Fix LocationConstraint error [cloudstack]

abh1sar opened a new pull request, #10772:
URL: https://github.com/apache/cloudstack/pull/10772

   ### Description
   
   This PR fixes https://github.com/apache/cloudstack/issues/10044
   
   ```
           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.
   `requestRegion = AwsHostNameUtils.parseRegion(requestEndpoint.getHost(), "s3");`
   Location constraint was being set if the url starts with "s3." So a possible workaround if using this type of endpoint is to not use such kind of name for the endpoint url. Use some proxy or dns.
   
   Have changed the code to pass null instead of auto which is resulting in LocationConstraint to not be set.
   
   ----
   One more change is regarding the error msg which is returned while creating a bucket when the same bucket name is already present but created by another user.
   Before:
   `Failed to create bucket with name: bucket2. AccessDenied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: tx00000610f7487f71ab177-00680a2196-ac4a-default; S3 Extended Request ID: ac4a-default-default; Proxy: null)`
   After:
   `Failed to create bucket with name: bucket2. Bucket already exists with the name: bucket2`
   
   This was because getBucketAcl doesn't work if the bucket was created by another user as the first user doesn't have Acl level access to the bucket.
   
   ----
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ******************************************************************************* -->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ******************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] 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
   - [x] Minor
   - [ ] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2830190145

   @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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-3626491317

   > @abh1sar For now, we're using a workaround using a URL without S3 (i.e., c3.dco.webdisk.io instead of s3.dco). It works, allowing users and buckets to be created; unfortunately, the browser doesn't work. We'll migrate to 4.22 soon and test it then. S3 is implemented via Ceph with the default zone, without any special configuration.
   
   @PPisz why doesn't the browser work?
   another workaround could be to use s3.us-east-1.dco.webdisk.io and let me know if it suits you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "wido (via GitHub)" <gi...@apache.org>.
wido commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2838566576

   > @rohityadavcloud @wido @DaanHoogland test failures are unrelated. Can we merge this?
   
   Yes, good to merge from my side


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "PPisz (via GitHub)" <gi...@apache.org>.
PPisz commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-3616082777

   @abh1sar For now, we're using a workaround using a URL without S3 (i.e., c3.dco.webdisk.io instead of s3.dco). It works, allowing users and buckets to be created; unfortunately, the browser doesn't work. We'll migrate to 4.22 soon and test it then. S3 is implemented via Ceph with the default zone, without any special configuration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2833877130

   @abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "PPisz (via GitHub)" <gi...@apache.org>.
PPisz commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-3649559446

   @abh1sar After the upgrade to 4.22, not much has changed. Buckets can be created and deleted (users create them correctly). The browser doesn't work (no error when refreshing), and when trying to load an object, the GUI displays a "Upload failed - Failed to fetch" message.
   
   The only error I found concerns the statistics:
   
   2025-12-13 05:36:26,278 DEBUG [o.a.c.s.o.B.BucketUsageTask] (Bucket-Usage-1:[ctx-f6e6fb06]) (logid:28638ea6) Getting bucket usage for Object Store "s3.dco.webdisk.io"
   2025-12-13 05:36:26,548 ERROR [o.a.c.s.o.B.BucketUsageTask] (Bucket-Usage-1:[ctx-f6e6fb06]) (logid:28638ea6) Failed to get bucket usage for Object Store "s3.dco.webdisk.io". Skipping this store. com.cloud.utils.exception.CloudRuntimeException: Cannot invoke "org.twonote.rgwadmin4j.model.BucketInfo$Usage$RgwMain.getSize_kb()" because the return value of "org.twonote.rgwadmin4j.model.BucketInfo$Usage.getRgwMain()" is null
           at org.apache.cloudstack.storage.datastore.driver.CephObjectStoreDriverImpl.getAllBucketsUsage(CephObjectStoreDriverImpl.java:313)
           at org.apache.cloudstack.storage.object.store.ObjectStoreImpl.getAllBucketsUsage(ObjectStoreImpl.java:155)
           at org.apache.cloudstack.storage.object.BucketApiServiceImpl$BucketUsageTask.runInContext(BucketApiServiceImpl.java:325)
           at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
           at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
           at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
           at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
           at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
           at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
           at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
           at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
           at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
           at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
           at java.base/java.lang.Thread.run(Thread.java:840)
   Caused by: java.lang.NullPointerException: Cannot invoke "org.twonote.rgwadmin4j.model.BucketInfo$Usage$RgwMain.getSize_kb()" because the return value of "org.twonote.rgwadmin4j.model.BucketInfo$Usage.getRgwMain()" is null
           at org.apache.cloudstack.storage.datastore.driver.CephObjectStoreDriverImpl.getAllBucketsUsage(CephObjectStoreDriverImpl.java:309)
           ... 13 more


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2827408655

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/10772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 4.00%. Comparing base [(`80b5d5c`)](https://app.codecov.io/gh/apache/cloudstack/commit/80b5d5c02984dcfd1aa589275f0695c3aa8c1c22?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`865ed45`)](https://app.codecov.io/gh/apache/cloudstack/commit/865ed45d18de4d837cd8d027497d91e40330c1c0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 71 commits behind head on 4.20.
   
   > :exclamation:  There is a different number of reports uploaded between BASE (80b5d5c) and HEAD (865ed45). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (80b5d5c) | HEAD (865ed45) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               4.20   #10772       +/-   ##
   =============================================
   - Coverage     16.00%    4.00%   -12.01%     
   =============================================
     Files          5651      398     -5253     
     Lines        495862    32532   -463330     
     Branches      60043     5761    -54282     
   =============================================
   - Hits          79367     1303    -78064     
   + Misses       407635    31080   -376555     
   + Partials       8860      149     -8711     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/10772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/10772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.00% <ø> (+<0.01%)` | :arrow_up: |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/10772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/10772?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "PPisz (via GitHub)" <gi...@apache.org>.
PPisz commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-3346069015

   @abh1sar Is this change also in 4.21? Unfortunately, I still have this bug in 4.21...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud merged PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-3615990465

   
   
   
   > @abh1sar Is this change also in 4.21? Unfortunately, I still have this bug in 4.21...
   
   Hi @PPisz can you please give some more info on the bug. Which kind of endpoint are you using for the object storage?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-3375162190

   @PPisz yes this is in 4.21. 
   Are you getting a similar error? `"Failed to create bucket with name: bucket1 com.cloud.utils.exception.CloudRuntimeException: The specified location-constraint is not valid (Service: Amazon S3; Status Code: 400; Error Code: InvalidLocationConstraint;"`
   You can raise a new Issue for this. It will be easier to track it there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2830186345

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2836300150

   <b>[SF] Trillian test result (tid-13167)</b>
   Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
   Total time taken: 55742 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10772-t13167-kvm-ol8.zip
   Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_restore_vm_strict_tags_failure | `Failure` | 59.52 | test_vm_strict_host_tags.py
   test_02_scale_vm_strict_tags_failure | `Failure` | 59.75 | test_vm_strict_host_tags.py
   test_06_deploy_vm_on_any_host_with_strict_tags_failure | `Failure` | 5.79 | test_vm_strict_host_tags.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2830377734

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2838486283

   @rohityadavcloud @wido @DaanHoogland test failures are unrelated. Can we merge this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2833875762

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Ceph object store: Fix LocationConstraint error [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #10772:
URL: https://github.com/apache/cloudstack/pull/10772#issuecomment-2838749343

   good to merge if it has been tested by someone else than the author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org