question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve handling of S3 offloading configuration in other regions

See original GitHub issue

Is your enhancement request related to a problem? Please describe. Currently, when using S3 offloading in a region other than us-east-1, the underlying jclouds library does some non-standard AWS things which require both:

A) the policy Pulsar is running as to have GetBucketLocation permissions and B) to change the endpoint to use a region specific endpoint

This causes confusion which is not well documented and difficult to explain, and different from most AWS implementations. See https://github.com/apache/pulsar/issues/3833 for context

Describe the solution you’d like We should do 2 things

  1. See if we can eliminate the need for GetBucketLocation, looking at https://github.com/apache/jclouds/blob/31a3e5b5df1543d04098e3a694130b7ae8e6e079/apis/s3/src/main/java/org/jclouds/s3/config/S3HttpApiModule.java#L91 it appears to only be used when jclouds detects multiple regions. Where jcloud is getting more than one region from isn’t clear, but if the user sets a region, we should just use that single region and skip the getBucketLocationCheck
  2. Ensure that setting just the region is sufficient to configure the correct endpoint. Getting rid of the GetBucketLocation check may be sufficient such that the default endpoint works, otherwise, we should build the correct endpoint name if the region is specified but no endpoint is manually provided

Describe alternatives you’ve considered Another consideration (and perhaps still a longer term goal) is to replace the use of jcloud for AWS (but still use it for other cloud providers) as jcloud does have some other behavior that differs from AWS.

Additional context

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Renkaicommented, Jan 25, 2021

If my understand is not wrong, current jcloud API we are using event don’t permit us to set region manually, it have to be generated by endpoint https://github.com/apache/pulsar/blob/98ad39ffa51239e389c73411dfb8df7f5592a5aa/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java#L283

Maybe we should help Jcloud make right error info, or we can use the official SDK of AWS to generate Jcloud compatible endpoint in advance.

0reactions
jcalcotecommented, Sep 30, 2022

Here’s a possible work around for some people’s use cases: https://stackoverflow.com/questions/73169813/jclouds-getbucketlocation-timeout-on-getblob/73902608#73902608

Note that this ticket also suggests a possible general solution whereby jclouds provides a mechanism for users to pre-load the bucket-to-region LoadingCache with key/value pairs for their buckets that are in known regions. This would seem to be simpler than trying to rework the api from top to bottom to pass in the user-specified endpoint.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Accelerate Performance and Availability of Multi ...
The AWS::S3::MultiRegionAccessPoint resource depends only on the S3 bucket names. You don't need to reference other regional stacks and you can ...
Read more >
10 things you should know about using AWS S3 - Sumo Logic
Improve S3 latency by paying attention to regions and connectivity · Improve S3 performance by using higher bandwidth networks · Use concurrency ...
Read more >
Amazon S3 Quick Start Guide - Delicious Brains
We also have Quick Start Guides for other storage providers. ... media to an Amazon S3 bucket; Bucket Security Settings; Offload Your ...
Read more >
Offload Media to Amazon S3 with LargeFS - Support Center
1 LargeFS Configuration Steps. 1.1 Create Bucket. 1.2 Give WP Engine Access. 1.3 Make Bucket Readable. 1.4 Provide Bucket to Support · 2...
Read more >
S3 configuration overview - ONTAP - Product documentation
However, if you need to specify which disks to include in the bucket, consider configuring S3 object storage from the CLI by specifying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found