-
Notifications
You must be signed in to change notification settings - Fork 560
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
mb: Update pkg to retry mb with unmatched region #2139
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2139 +/- ##
======================================
Coverage 8.89% 8.89%
======================================
Files 92 92
Lines 6837 6837
======================================
Hits 608 608
Misses 6094 6094
Partials 135 135 Continue to review full report at Codecov.
|
cmd/client-s3.go
Outdated
@@ -762,6 +763,11 @@ func (c *s3Client) MakeBucket(region string) *probe.Error { | |||
} | |||
e := c.api.MakeBucket(bucket, region) | |||
if e != nil { | |||
// Enhance error message when invalid region error is received | |||
if errResp, ok := e.(minio.ErrorResponse); ok && errResp.Code == "InvalidRegion" { | |||
errResp.Message = fmt.Sprintf("The server rejected `%s` region. Kindly pass the correct region value using `--region` flag.", region) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually retry with the Region returned in the headers. not sure if this is needed..
This PR is waiting on - minio/minio-go#665 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minio/minio-go#665 waiting on this.
Fixes #2107