Repository navigation
fix(install): run SeaweedFS KEK recovery container as root - #4612
Open
pcbeingused333 wants to merge 2 commits into
Open
pcbeingused333 wants to merge 2 commits into
pcbeingused333 wants to merge 2 commits into
Conversation
The recovery step reads /data/.mini_kek_passphrase through --volumes-from. weed writes that file as root with mode 0600, and the sentry-self-hosted-local image now runs as a non-root user, so the read fails with PermissionError when upgrading from before 26.8.0 with a wrapped filer KEK. Run the one-shot, read-only container with --user 0. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
aminvakil
suggested changes
Nov 5, 2026
aminvakil
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for fixing this.
This does not need a unit test as well.
aminvakil
approved these changes
Nov 5, 2026
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.
Fixes #4577
Cause
install/migrate-seaweedfs-kek.shrecovers a wrapped legacy filer KEK by runningscripts/recover_seaweedfs_kek.pyinsentry-self-hosted-localwith--volumes-fromthe temporary SeaweedFS container. The script reads/data/.mini_kek_passphrase, which weed creates as root with mode 0600. Since the sentry image runs as a non-root user, the read fails withPermissionErrorand the install aborts (before the marker is written or Postgres is touched, so a re-run is safe). It only shows up when upgrading from before 26.8.0 and the stored KEK is wrapped; a plain-hex KEK skips this path.Fix
Add
--user 0to that one-shot container, which only reads the volume and prints the key.Test
New
_unit-test/migrate-seaweedfs-kek-test.shstubs the container engine and asserts that the recoveryrunis started with--user 0. It fails on main and passes with the change.This PR was prepared with AI assistance (Claude Code) and the change reviewed against the issue's reproduction.