Bounded umount retry for eject/format - #182
Merged
Merged
Conversation
Eject unmounted 9ms after the parent smbd died; the per-connection child still pinned the share and the strict umount hit EBUSY. A bounded non-lazy retry (~3s) absorbs the teardown window; persistent holders still surface busy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds bounded plain-unmount retries to absorb transient Samba teardown races without allowing lazy detachment.
Changes:
- Retries busy unmounts for eject and format with configurable limits.
- Preserves immediate lazy fallback for physical removal.
- Tests transient success and retry exhaustion.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
lib/universal_proxy/storage/server.ex |
Implements and documents bounded busy-unmount retries. |
test/universal_proxy/storage/server_test.exs |
Verifies retry success, exhaustion, and no lazy fallback. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
umounthit EBUSY and the eject was refused.eject/2andformat/3now retry the plain (non-lazy) umount up to:umount_retriestimes,:umount_retry_msapart (defaults 6 / 500ms, ~3s), absorbing that teardown window while a persistent holder still surfaces{:error, :busy};reconcile_removal/1's lazy-fallback path is untouched.Test plan
mise run test -- test/universal_proxy/storage/(258 passed)mix compile --warnings-as-errorsmise exec -- sh -c 'MIX_TARGET=host MIX_ENV=dev mix dialyzer'force_unmount/1) tests unchanged, confirming single-plain-then-lazy semantics remain untouched🤖 Generated with Claude Code