Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Capability to specify the aws region while creating the snapshot repository #16119

Open
navneet1v opened this issue Sep 29, 2024 · 3 comments
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Snapshots

Comments

@navneet1v
Copy link
Contributor

navneet1v commented Sep 29, 2024

Is your feature request related to a problem? Please describe

I was trying to take a manual snapshot of my cluster which was in us-west-2 region and my bucket was also in the same region. But I kept on getting error because the default region provided which s3 client takes in us-east-1 and even when my machine was in us-west-2 it was not picking up that region.

"error":{"root_cause":[{"type":"repository_verification_exception","reason":"[test-navneet-us-west-2-repository] path [test-navneet-us-west-2/10m-cohere-217-snaphot] is not accessible on cluster-manager node"}],"type":"repository_verification_exception","reason":"[test-navneet-us-west-2-repository] path [test-navneet-us-west-2/10m-cohere-217-snaphot] is not accessible on cluster-manager node","caused_by":{"type":"i_o_exception","reason":"Unable to upload object [test-navneet-us-west-2/10m-cohere-217-snaphot/tests-QivGuhDBSAKfvsayxo2NLQ/master.dat] using a single upload","caused_by":{"type":"s3_exception","reason":"s3_exception: Please re-send this request to the specified temporary endpoint. Continue to use the original request endpoint for future requests. (Service: S3, Status Code: 307, Request ID:XXXXX, Extended Request ID: ZXXXX)"}}},"status":500}

Describe the solution you'd like

A solution I would like to see is one of the below:

  1. Either Opensearch should pick the region from the machine region
  2. Opensearch should start taking the region while setting up the snapshot repository.

Related component

Storage:Snapshots

Describe alternatives you've considered

The only alternative I had was the update the opensearch.yml file and restart the cluster. Restarting of a cluster might is not a right choice.

https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore/#amazon-s3:~:text=(Optional)%20Add%20other%20settings%20to%20opensearch.yml%3A

Additional context

No response

@navneet1v navneet1v added enhancement Enhancement or improvement to existing feature or request untriaged labels Sep 29, 2024
@mgodwan
Copy link
Member

mgodwan commented Oct 1, 2024

@navneet1v Does setting the following help in getting rid of the error?

static final Setting.AffixSetting<String> REGION = Setting.affixKeySetting(
PREFIX,
"region",
key -> new Setting<>(key, "", Function.identity(), Property.NodeScope)
);

@navneet1v
Copy link
Contributor Author

@mgodwan I ended up using the setting s3.client.default.region but this setting was not dynamic. I see what you provided as a setting is s3.client.region am I correct? and also can you tell me if s3.client.region is a dynamic setting? and also where this setting is provided in documentation.

@gbbafna
Copy link
Collaborator

gbbafna commented Oct 17, 2024

[Storage Triage] - Attendees 1 2 3 4

@navneet1v Can you please try putting region - us-west-2 in the repository settings ? Currently repository doesn't read cluster settings dynamically .

@gbbafna gbbafna removed the untriaged label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Snapshots
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants