-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Minio S3 storage not working for LFS or attachments #13286
Comments
Could you find storages logs when gitea start, like below
|
I don't see anything about storage in the logs. Here is the startup log: https://gist.github.com/adamb70/5415b31be481db6fc325773c0c956c12 And here is the logging config in my ini file:
If it helps at all, here is my full gitea-app.ini file: https://gist.github.com/adamb70/963accf8c1e8b28f43c5a336f6262259 |
It seems there are something lost in your log? |
I am starting Gitea up through docker-compose, so maybe some log info doesn't get sent through to the console? I have tried again with setting log |
@adamb70 please update to at least g25b7766673. We added logging in from that point to help us diagnose what was going on with storage. (Assuming you're not running gitea with --port - which you shouldn't anyway - just jump to the latest) |
Thanks for the new release @zeripath. The full log is as follows: https://gist.github.com/adamb70/5e315aa4bc8afde849e64033703e7ddb The relevant storage part is here:
It seems like it's still trying to use local storage, despite the app.ini file. I am binding the ini file in the Docker container to a local file outside so it can be managed from outside the container. This seems to work fine to change any other settings in the ini file, it's just the storage I'm seeing the issue with.
|
Looks like the storage type isn't being set... |
OK it looks like there's a bug here: gitea/modules/setting/storage.go Line 49 in c5020cf
I bet that this should actually default to in the meantime I think if you create a new ini section: [storage.minio]
STORAGE_TYPE=minio That would make the minio work |
The default STORAGE_TYPE should be the provided type. Fix go-gitea#13286 Signed-off-by: Andrew Thornton <art27@cantab.net>
Strangely I'm now getting the following error:
It seems like it is interpreting the endpoint URL as an empty string for some reason. Here's the line that I think is throwing the error https://github.com/minio/minio-go/blob/master/utils.go#L91 .
|
It seems like the gitea/modules/storage/minio.go Line 89 in 25b7766
Some Googling suggests it should be |
nope that's not it. The problem will be in modules/setting/storage.go |
Actually it wasn't! The issue is that the toConfig string wasn't matching the Mappable interface because the config wasn't being passed as a pointer. There was a further bug in the MapTo. Sorry about this - I think I have it finally fixed now. |
This PR fixes several bugs in setting storage * The default STORAGE_TYPE should be the provided type. * The Storage config should be passed in to NewStorage as a pointer - otherwise the Mappable interface function MapTo will not be found * There was a bug in the MapTo function. Fix #13286 Signed-off-by: Andrew Thornton <art27@cantab.net>
Backport go-gitea#13297 This PR fixes several bugs in setting storage * The default STORAGE_TYPE should be the provided type. * The Storage config should be passed in to NewStorage as a pointer - otherwise the Mappable interface function MapTo will not be found * There was a bug in the MapTo function. Fix go-gitea#13286 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix Storage mapping (#13297) Backport #13297 This PR fixes several bugs in setting storage * The default STORAGE_TYPE should be the provided type. * The Storage config should be passed in to NewStorage as a pointer - otherwise the Mappable interface function MapTo will not be found * There was a bug in the MapTo function. Fix #13286 Signed-off-by: Andrew Thornton <art27@cantab.net> * add missing changes from backport #13164 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Using latest Docker image.
[x]
):Description
I am trying to use S3 to host files in attachments and LFS using the minio storage type, but the files are instead being stored locally. I think this may be a problem of improper configuration, as there are no errors logged so it seems that Gitea doesn't even try to save the files to S3. The relevant parts of the ini file are below, any help is appreciated.
The text was updated successfully, but these errors were encountered: