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

[BUG] Wrong URL for S3 endpoint #1590

Closed
muhammadimranfarooqi opened this issue Aug 9, 2022 · 2 comments · Fixed by #1631
Closed

[BUG] Wrong URL for S3 endpoint #1590

muhammadimranfarooqi opened this issue Aug 9, 2022 · 2 comments · Fixed by #1631
Labels

Comments

@muhammadimranfarooqi
Copy link

Describe the bug

Hi, I am trying to create a profile for s3compliant using the endpoint s3.cern.ch. Instead of looking at the desired URL, it appends this URL to https://s3.cern.amazonaws.com. I run the following command and get the error as shown below.

Command

kanctl create profile s3compliant --access-key $ACCESS_KEY --secret-key $SECRET_KEY --endpoint https://s3.cern.ch/ --bucket mongodb-backup --region cern --namespace default --verbose

Output

secret 's3-secret-cy0fja' created
Failed the 'Validate bucket region specified in profile' check.. ❌
validation failed, deleting secret 's3-secret-cy0fja'
secret 's3-secret-cy0fja' deleted
Error: profile validation failed: failed to get bucket mongodb-backup: GetBucketLocation: RequestError: send request failed
caused by: Get "https://s3.cern.amazonaws.com/mongodb-backup?location=": dial tcp: lookup s3.cern.amazonaws.com on 137.138.16.5:53: no such host
{"File":"pkg/kanctl/kanctl.go","Function":"github.com/kanisterio/kanister/pkg/kanctl.Execute","Line":48,"error":"profile validation failed: failed to get bucket mongodb-backup: GetBucketLocation: RequestError: send request failed\ncaused by: Get \"https://s3.cern.amazonaws.com/mongodb-backup?location=\": dial tcp: lookup s3.cern.amazonaws.com on 137.138.16.5:53: no such host","hostname":"imran-cc.cern.ch","level":"info","msg":"Kanctl failed to execute","time":"2022-08-09T19:57:22.077775142+02:00"}

Could someone please help to fix this issue? Thanks

Best regards
M Imran

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2022

Thanks for opening this issue 👍. The team will review it shortly.

If this is a bug report, make sure to include clear instructions how on to reproduce the problem with minimal reproducible examples, where possible. If this is a security report, please review our security policy as outlined in SECURITY.md.

If you haven't already, please take a moment to review our project's Code of Conduct document.

@github-actions github-actions bot added the triage label Aug 9, 2022
@ihcsim
Copy link
Contributor

ihcsim commented Aug 9, 2022

@muhammadimranfarooqi thanks for filing the issue. Looks like a bug in the profile validation code where the profile endpoint is not copied to the objectstore config. As a test, can you re-run your command with the --skip-validation flag to see if that works? Meanwhile, will you be interested in submitting a pull request fix? It should be a three-line change. If yes, I can show you where the code is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants