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
ImgUploader: add support for non-amazon S3 #20354
Conversation
6807df8
to
63bb5fc
Compare
@emmericp Thanks. The issue you're referring to is closed. However, there's another one #8157. Please update PR description if you think your PR solves this feature request taking this #8157 (comment) into account. |
Oh, I didn't see that one. Yeah, it should work with virtually anything that implements the bare minimum of S3 because it doesn't use any advanced feature at all. I've only tested it against Ceph/radosgw which implements most S3 and most S3-compatible services you find on the Internet run it. Updated |
This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
ping |
This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
ping. happy to provide test access to a public S3 bucket |
We're planning to review this soon. Please have patient. Thanks |
This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@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.
LGTM!
Please note though that I renamed the 'host' setting to 'endpoint', in order to be consistent with S3 nomenclature.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Merged - thanks for contributing to Grafana! |
* imguploader: add support for non-Amazon S3 endpoints and forcing of path-style S3 addressing fixes grafana#11240 Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Hello, "Failed to render and upload alert panel image." logger=alerting.notifier ruleId=7 error="Could not find bucket setting for image.uploader.s3" Here is my config. [external_image_storage.s3] Can you please give a more config info. Thanks. |
bellow info show that S3 works from that server . root@dash:~# s3cmd --configure Enter new values or accept defaults in brackets with Enter. Access key and Secret key are your identifiers for Amazon S3. Leave them empty for using the env variables. Use "s3.amazonaws.com" for S3 Endpoint and not modify it to the target Amazon S3. Use "%(bucket)s.s3.amazonaws.com" to the target Amazon S3. "%(bucket)s" and "%(location)s" vars can be used Encryption password is used to protect your files from reading When using secure HTTPS protocol all communication with Amazon S3 On some networks all internet access must go through a HTTP proxy. New settings: Test access with supplied credentials? [Y/n] y Now verifying that encryption works... |
@@ -35,7 +35,7 @@ func NewImageUploader() (ImageUploader, error) { | |||
return nil, err | |||
} | |||
|
|||
host := s3sec.Key("host").MustString("") | |||
endpoint := s3sec.Key("endpoint").MustString("") | |||
pathStyleAccess := s3sec.Key("path_style_access").MustBool(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 is not working line.
Hi , our S3 path_style_access is https://s3.xxxxxxx.com/bucket/key not https://bucket.s3.xxxxxxx.com/key . I have this configuration on grafana.ini [external_image_storage.s3] i changed path_style_access to our custom but it still trying to connect to this one ` https://bucket.s3.xxxxxxx.com/key LOG: t=2020-12-09T07:16:37-0500 lvl=eror msg="Failed to render and upload alert panel image." logger=alerting.notifier ruleId=7 error="RequestError: send request failed\ncaused by: Put "**https://xxx-grafana-bucket.s3.xxxxxx.com/gSvYnzqm8MDUnpMyIk7X.png**\": x509: certificate is valid for *.xxxxxxxx.com, xxxxxxxx.com, not xx-grafana-bucket.s3.xxxxxxx.com" Seems BUG. |
Hi @IamAliBaba! I'm sorry you are having trouble with this. Please file a bug report. |
Make hostname for S3 upload configurable to support non-Amazon S3 backends. Also add an option to use path style access as some poorly configured S3 backends sometimes don't support the default subdomain mode.
Fixes #8157
Question: how is the S3 backend usually tested? I found an integration test but no information on how it is usually run?