Skip to content

fix(unmount): don't require broker/bucket creds to unmount - #25

Merged
tofarr merged 1 commit into
mainfrom
fix/unmount-no-store-creds
Sep 4, 2026
Merged

tofarr merged 1 commit into
mainfrom
fix/unmount-no-store-creds

Conversation

@tofarr

@tofarr tofarr commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

fusey unmount <mountpoint> failed with either FUSEY_BROKER_URL or FUSEY_BUCKET is required even when a daemon was actively serving the mount. The unmount path only scans FUSEY_CACHE_DIR/*/daemon.pid to find the daemon PID and sends it SIGTERM — 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. runUnmount therefore inherited a check it does not need.

Fix

Split the check out of mustLoadConfig() into a dedicated requireStore(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/O
  • runCompact — loads/persists the index via the store

runUnmount keeps calling mustLoadConfig() (it still needs CacheDir) but skips requireStore().

Verification

Before:

$ fusey unmount /sdk
2026/09/04 12:01:32 either FUSEY_BROKER_URL or FUSEY_BUCKET is required

After:

$ FUSEY_CACHE_DIR=/tmp/cache fusey unmount /sdk
2026/09/04 12:08:15 no active daemon found for mountpoint /sdk

The unmount path now proceeds past config loading to the PID-file scan and reports the real state. go build ./... and go 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.

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>

@hieptl hieptl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙏

@tofarr
tofarr merged commit ef0c3cf into main Sep 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants