-
-
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
The storage.repo-archive and storage.packages configs do not accept custom STORAGE_TYPE #20703
Comments
As a workround, you can remove all the related configuration and only left below: [storage]
STORAGE_TYPE = minio
MINIO_ENDPOINT = s3.my-domain.net
MINIO_BUCKET = gitea
MINIO_LOCATION = homenet
MINIO_USE_SSL = true
MINIO_ACCESS_KEY_ID = correct_key
MINIO_SECRET_ACCESS_KEY = correct_key |
And that did the trick. Gitea config considerably shortened. Thanks @lunny! For me this is an even better solution than solving the actual bug would be. But should we still leave the issue open for a future fix enabling package and repo archive storage to use a custom storage config? |
Does this work for all storage types? so i don't need to configure attachments / lfs / picture ... manually? |
Yes, except you have special configuration which will override it. |
Does this also work with [attachment] configuration. |
I will add some test and possible fix after #22405 merge. |
…23911) Follow up #22405 Fix #20703 This PR rewrites storage configuration read sequences with some breaks and tests. It becomes more strict than before and also fixed some inherit problems. - Move storage's MinioConfig struct into setting, so after the configuration loading, the values will be stored into the struct but not still on some section. - All storages configurations should be stored on one section, configuration items cannot be overrided by multiple sections. The prioioty of configuration is `[attachment]` > `[storage.attachments]` | `[storage.customized]` > `[storage]` > `default` - For extra override configuration items, currently are `SERVE_DIRECT`, `MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another section. The prioioty of the override configuration is `[attachment]` > `[storage.attachments]` > `default`. - Add more tests for storages configurations. - Update the storage documentations. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
…o-gitea#23911) Follow up go-gitea#22405 Fix go-gitea#20703 This PR rewrites storage configuration read sequences with some breaks and tests. It becomes more strict than before and also fixed some inherit problems. - Move storage's MinioConfig struct into setting, so after the configuration loading, the values will be stored into the struct but not still on some section. - All storages configurations should be stored on one section, configuration items cannot be overrided by multiple sections. The prioioty of configuration is `[attachment]` > `[storage.attachments]` | `[storage.customized]` > `[storage]` > `default` - For extra override configuration items, currently are `SERVE_DIRECT`, `MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another section. The prioioty of the override configuration is `[attachment]` > `[storage.attachments]` > `default`. - Add more tests for storages configurations. - Update the storage documentations. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
…23911) (#25244) Backport #23911 by @lunny Follow up #22405 Fix #20703 This PR rewrites storage configuration read sequences with some breaks and tests. It becomes more strict than before and also fixed some inherit problems. - Move storage's MinioConfig struct into setting, so after the configuration loading, the values will be stored into the struct but not still on some section. - All storages configurations should be stored on one section, configuration items cannot be overrided by multiple sections. The prioioty of configuration is `[attachment]` > `[storage.attachments]` | `[storage.customized]` > `[storage]` > `default` - For extra override configuration items, currently are `SERVE_DIRECT`, `MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another section. The prioioty of the override configuration is `[attachment]` > `[storage.attachments]` > `default`. - Add more tests for storages configurations. - Update the storage documentations. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Description
Hello,
I am using S3 storage provided by my Ceph cluster for Gitea's LFS, Avatar, attachment, repo-archive and packages storage. My storage configuration currently looks like this:
This configuration works without problems. But I need to repeat my S3 configuration three times. Once for the default storage config used by attachments and so on, and then once each for the package and repo-archive storage.
Now to the bug itself. I had originally hoped that the two new storage items, packages and repo-archive would work similar to the
lfs
section above, by only setting theSTORAGE_TYPE
option tomy_minio
, avoiding the multiple repeats of the S3 configs.But with the following config, I'm getting errors during Gitea startup:
This seems to working in so far as the package and repo-archive storage now try to use
my_minio
, but trying to use that then fails with this log output:What I would expect to happen: Like for the
lfs
config, the default storage config, in turn using my customizedmy_minio
storage is used, instead of having to configure the same options three times.Gitea Version
1.17.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
N/A
Operating System
Run via Docker
How are you running Gitea?
I'm using the official Gitea Docker container, with one slight adaption, namely completely disabling the external SSH daemon by not even starting it.
The container is deployed on a Nomad cluster.
The most important difference perhaps: Instead of MinIO, I'm using S3 provided by Ceph.
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: