Repository navigation
fix(unmount): don't require broker/bucket creds to unmount - #25
Merged
Merged
Conversation
runUnmount only scans FUSEY_CACHE_DIR/*/daemon.pid to find the daemon PID and sends SIGTERM; it never touches S3 or the broker. The object-store requirement was baked into the shared mustLoadConfig() helper, so failed with "either FUSEY_BROKER_URL or FUSEY_BUCKET is required" even when a daemon was running. Split the check out of mustLoadConfig() into requireStore(cfg) and call it only in the paths that need object storage: runMount, runDaemon, runCompact. Co-authored-by: openhands <openhands@all-hands.dev>
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.
Summary
fusey unmount <mountpoint>failed witheither FUSEY_BROKER_URL or FUSEY_BUCKET is requiredeven when a daemon was actively serving the mount. The unmount path only scansFUSEY_CACHE_DIR/*/daemon.pidto find the daemon PID and sends itSIGTERM— it never contacts S3 or the broker, so requiring those credentials there is a bug.Root cause
The object-store requirement was enforced inside the shared
mustLoadConfig()helper, which every subcommand calls.runUnmounttherefore inherited a check it does not need.Fix
Split the check out of
mustLoadConfig()into a dedicatedrequireStore(cfg)helper, and call it only in the paths that actually need object storage:runMount— needs the store (via the daemon it spawns)runDaemon— performs S3/broker I/OrunCompact— loads/persists the index via the storerunUnmountkeeps callingmustLoadConfig()(it still needsCacheDir) but skipsrequireStore().Verification
Before:
After:
The unmount path now proceeds past config loading to the PID-file scan and reports the real state.
go build ./...andgo test ./...pass (all 6 packages). Mount/daemon/compact still enforce the requirement where it matters.This PR was created by an AI agent (OpenHands) on behalf of the user.