Repository navigation
Replace minio with built-in S3 endpoint - #3258
Merged
Merged
Conversation
stgraber
force-pushed
the
deprecation
branch
10 times, most recently
from
April 30, 2026 16:43
e5cc6a9 to
a70fd51
Compare
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
This introduces a new built-in S3 listener supporting the basic S3 operations. It stores data on the filesystem under the data/ directory and uses a .meta suffix for S3 JSON metadata. Signed-off-by: Stéphane Graber <[email protected]>
This replaces the old minio proxy logic with instead using the new built-in S3 listener logic. Signed-off-by: Stéphane Graber <[email protected]>
Rather than implement this as a potentially very slow one-time operation on startup, we instead will be doing the migration as buckets get accessed. A lock is in place to avoid concurent migration and the migration will be triggered until the minio directory is fully converted (allows for resuming after a crash). We can still add a patch later down the line converting whatever is left, but this should reduce the impact of the transition to our own S3 listener. The original minio metadata (.minio) is kept within the bucket so no data is lost during conversion. The migration logic handles both large chunked files and small file storage in minio. It's made slightly harder because of minio writing a 32 byte checksum every 1MiB which needs to be stripped during conversion. Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
The minio client hardcoded us-east-1 as the region which would then break uploads to other AWS S3 regions. Add some logic to try and guess the correct region. Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
bensmrs
approved these changes
Apr 30, 2026
bensmrs
left a comment
Member
There was a problem hiding this comment.
That’d be very dishonest to say that I carefully reviewed this, but the tests are happy, and so am I.
| const minioMetaFile = "xl.meta" | ||
|
|
||
| // migrateLocks serialises migrations per bucket directory. | ||
| var migrateLocks sync.Map // map[string]*sync.Mutex |
Member
There was a problem hiding this comment.
Why the comment? leftover attempt?
Member
Author
There was a problem hiding this comment.
It's trying to indicate the effective type of the sync.Map so it's easier to remember what the values need to be cast to.
| const accessKeyAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | ||
| const secretKeyAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" | ||
|
|
||
| randomString := func(alphabet string, n int) (string, error) { |
Member
There was a problem hiding this comment.
Isn’t there a safe crypto implementation?
15 of 19 tasks
dtomvan
added a commit
to dtomvan/puntbestanden
that referenced
this pull request
May 3, 2026
Disables minio as it's unmaintained See NixOS/nixpkgs#514811 and lxc/incus#3258
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2956
Closes #2726