Compatibility with seaweedfs (s3) broken #12300

Closed
opened 2025-11-02 10:04:53 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @0x450x6c on GitHub (Jan 6, 2024).

Description

Hello.

It seems this commit broke the compatibility with seaweedfs s3.

Gitea fails to start with following error in the logs: [F] code.gitea.io/gitea/modules/storage.Init failed: expected element type <VersioningConfiguration> but have <ListBucketResult>

I'm using simple configuration which was working fine before:

STORAGE_TYPE = "minio"
SERVE_DIRECT = true
MINIO_ENDPOINT = "s3.guix.uz:443"
MINIO_ACCESS_KEY_ID = "#minio_access_key_id#"
MINIO_SECRET_ACCESS_KEY = "#minio_secret_access_key#"
MINIO_BUCKET = "gitea"
MINIO_USE_SSL = true

It should be easy to reproduce if you have seaweedfs instance.

Gitea Version

Gitea version 1.21.2 built with go1.21.5 : pam, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/0x450x6c/525b74eba4c8ef40eb01dca9e54ae38b

Screenshots

No response

Git Version

No response

Operating System

nixos

How are you running Gitea?

I'm using nixos's gitea module.

Database

PostgreSQL

Originally created by @0x450x6c on GitHub (Jan 6, 2024). ### Description Hello. It seems [this commit](https://github.com/go-gitea/gitea/commit/7818121d50fd9ce3739c3d2221402841781e04b9) broke the compatibility with seaweedfs s3. Gitea fails to start with following error in the logs: `[F] code.gitea.io/gitea/modules/storage.Init failed: expected element type <VersioningConfiguration> but have <ListBucketResult>` I'm using simple configuration which was working fine before: ``` STORAGE_TYPE = "minio" SERVE_DIRECT = true MINIO_ENDPOINT = "s3.guix.uz:443" MINIO_ACCESS_KEY_ID = "#minio_access_key_id#" MINIO_SECRET_ACCESS_KEY = "#minio_secret_access_key#" MINIO_BUCKET = "gitea" MINIO_USE_SSL = true ``` It should be easy to reproduce if you have seaweedfs instance. ### Gitea Version Gitea version 1.21.2 built with go1.21.5 : pam, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/0x450x6c/525b74eba4c8ef40eb01dca9e54ae38b ### Screenshots _No response_ ### Git Version _No response_ ### Operating System nixos ### How are you running Gitea? I'm using nixos's gitea module. ### Database PostgreSQL
GiteaMirror added the type/bugissue/workaround labels 2025-11-02 10:04:53 -06:00
Author
Owner

@dajrivera commented on GitHub (Jan 6, 2024):

Get Bucket Versioning was implemented in seaweedfs in https://github.com/seaweedfs/seaweedfs/pull/4998, included in seaweedfs 3.60. However, the implementation was returning a malformed response (reported in https://github.com/seaweedfs/seaweedfs/issues/5155).

The fix has been merged to the master branch and should be available in the next seaweedfs release.

For the meantime, I'm using the following in my nginx proxy as a workaround:

if ( $args ~ .*versioning.* ) {
    return 200 '<VersioningConfiguration xlmns="http://s3.amazonaws.com/2006-03-01/"><Status>Suspended</Status></VersioningConfiguration>';
}
@dajrivera commented on GitHub (Jan 6, 2024): Get Bucket Versioning was implemented in seaweedfs in https://github.com/seaweedfs/seaweedfs/pull/4998, included in seaweedfs 3.60. However, the implementation was returning a malformed response (reported in https://github.com/seaweedfs/seaweedfs/issues/5155). The fix has been merged to the master branch and should be available in the next seaweedfs release. For the meantime, I'm using the following in my nginx proxy as a workaround: ``` if ( $args ~ .*versioning.* ) { return 200 '<VersioningConfiguration xlmns="http://s3.amazonaws.com/2006-03-01/"><Status>Suspended</Status></VersioningConfiguration>'; } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12300