-
Notifications
You must be signed in to change notification settings - Fork 520
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
S3 dualstack mode check #3721
S3 dualstack mode check #3721
Conversation
Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Mario <mariorvinas@gmail.com>
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.
Made changes as suggested @mapno
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.
Left a few more comments. Could you add a changelog entry as well?
Also, you'll need to sign the CLA. Thanks!
Have you run |
Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Mario <mariorvinas@gmail.com>
Run |
@mapno I've made the necessary changes. Let me know if it looks good |
You need to sign the CLA. It's in the first comment #3721 (comment). Thanks |
@mapno any other changes required from our end |
tempodb/backend/s3/s3.go
Outdated
@@ -660,6 +660,8 @@ func createCore(cfg *Config, hedge bool) (*minio.Core, error) { | |||
opts.BucketLookup = minio.BucketLookupType(cfg.BucketLookupType) | |||
} | |||
|
|||
opts.UseDualStack = cfg.UseDualStack |
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.
This option does not exist. Disabling dualstack endpoints is configured via a method in the client https://github.com/minio/minio-go/pull/1945/files#diff-f7bb71ca856c07b3329265f26b1e577e00b71e4792550cf14346bdbe0e7bd18dR342-R346.
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.
This is why the pipeline is failing
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.
So in this case, according to this function, the minio is going to use the dualstack endpoint everytime there's an s3 url present, right ?. How can we override this ?
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.
You just need to call that function with false
Although not mandatory in this case, a unit test would be appreciated. |
@mapno , I've made the suggested changes. Does it look fine now ? |
tempodb/backend/s3/s3.go
Outdated
clnt := &minio.Client{} | ||
|
||
if cfg.UseDualStack { | ||
clnt.SetS3EnableDualstack(false) | ||
} |
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.
This client is never returned. You need to apply the config to the client returned by this function newCore()
.
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.
@mapno , I have modified the core and api logic. But make vendor-check
both on local and on the workflow deletes the changes made. Can you help me here
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.
I appreciate you might not be familiar with Go or Tempo's codebase, but please stop pushing broken commits. The contributing guide I initially linked describes how you can make sure that the build at least compiles and passes the tests.
If you don't understand the change that you need to do, please let us know and we'd be glad to help.
tempodb/backend/s3/s3.go
Outdated
Secure: !cfg.Insecure, | ||
Creds: creds, | ||
Transport: transport, | ||
DualStackEnabled: cfg.UseDualStack, |
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.
This option doesn't exist, it's configured via a method SetS3EnableDualstack
on the client (what's returned by minio.NewCore()
)
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.
Sure @mapno , I appreciate your help throughout and would be glad if you're able to find time to fix this. I'll try to learn better and contribute. Thanks
aa659dc
to
9de2677
Compare
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're very close now
tempodb/backend/s3/s3.go
Outdated
if cfg.UseDualStack { | ||
clnt.SetS3EnableDualstack(true) | ||
} else { | ||
clnt.SetS3EnableDualstack(false) | ||
} |
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.
if cfg.UseDualStack { | |
clnt.SetS3EnableDualstack(true) | |
} else { | |
clnt.SetS3EnableDualstack(false) | |
} | |
clnt.SetS3EnableDualstack(cfg.UseDualStack) |
the |
You can run |
Yes, I did
|
I'm facing a similar problem. Hope this gets resolved soon! @mapno |
@mapno , Can you guide me on what went wrong on the last pipeline. I can quickly make further changes as required.. |
Hi @mapno , if this pr is not upto your expectations, I can raise a new pr as well. Please let me know |
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.
I was away last week. The PR is now close to being approvable, there is only one comment left. Also, could you add a changelog entry?
My only worry is if the update is going to mess with S3 backends, now that the expiration for the credentials is being honoured. I suppose that's the intended behaviour, so that's OK.
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.
Thank you for updating the documentation.
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.
LGTM
Thanks @mapno, @knylander-grafana for the approval and guidance. One more thing, I don't see a way to draft a release (as mentioned on the releases.md), so I assume its done from the codeowners side. Is there a time bound on when can we expect a new release as this alleviates a huge cost infliction on our systems? |
We aim to do a release roughly once every quarter (3 months). We released v2.5 less then a month ago, so I wouldn't expect to have v2.6 before a couple of months. In the meantime, we publish builds for all commits in |
What this PR does: Adds a boolean param enabling (disabled by default) the use of dualstack mode on s3 which minio does by default
Which issue(s) this PR fixes:
Fixes #3720
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]