Skip to content

Fix alluxio-fuse mount reporting success when the mount failed - #18756

Open
Stephen-Pu wants to merge 1 commit into
Alluxio:mainfrom
Stephen-Pu:fix/issue-15220-fuse-mount-false-success
Open

Fix alluxio-fuse mount reporting success when the mount failed#18756
Stephen-Pu wants to merge 1 commit into
Alluxio:mainfrom
Stephen-Pu:fix/issue-15220-fuse-mount-false-success

Conversation

@Stephen-Pu

@Stephen-Pu Stephen-Pu commented Jul 1, 2026

Copy link
Copy Markdown

Fix alluxio-fuse mount (integration/fuse/bin/alluxio-fuse) reporting a
successful mount when the mount actually failed.

Previously the mount outcome was inferred from whether a background process was
still alive after a fixed sleep, and $! referred to the wrapping subshell
( nohup ... ) & rather than the AlluxioFuse process itself:

(nohup ${cmd} > ${ALLUXIO_LOGS_DIR}/fuse.out 2>&1) &
sleep ${mount_sleep_seconds}
if kill -0 $! > /dev/null 2>&1 ; then   # "success" == some pid alive after 2s

This PR:

  • Drops the subshell wrapper so $! is the real AlluxioFuse pid.
  • Adds a wait_for_fuse_mount(pid, timeout) helper that polls up to the
    configured timeout and reports success only once the mount point actually
    appears in the mount table
    (reusing the existing fuse_mounted helper),
    bailing out early if the process exits first.

The existing -t option (mount_sleep_seconds) is reused as the poll budget,
so there is no new configuration.

Fixes #15220. A process-liveness check alone cannot distinguish "mount
succeeded" from "process is still starting up / slow to fail but the mount never
happened", so an invalid mount (e.g. alluxio-fuse mount / <path>) was reported
as Successfully mounted even though it failed. Verifying that the mount point
is actually present makes the success/failure report correct.

The alluxio-fuse mount command now reports Failed to mount ... (exit code 1)
when the mount does not actually establish, instead of incorrectly reporting
success. No API or property-key changes.

The mount success/failure was inferred solely from whether a background
process was still alive after a fixed sleep, and $! referred to the
wrapping subshell rather than the AlluxioFuse process. A process that was
still starting up (or slow to fail) was therefore misreported as a
successful mount even when the mount never happened.

Capture the real AlluxioFuse pid and add wait_for_fuse_mount(), which
polls up to the configured timeout and reports success only once the
mount point actually appears in the mount table (via the existing
fuse_mounted helper), bailing out early if the process exits first.

Fixes Alluxio#15220
@alluxio-bot

Copy link
Copy Markdown
Contributor

Thank you for your pull request.
In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement (CLA).
It's all electronic and will take just a few minutes. Please download CLA form here, sign, and e-mail back to cla@alluxio.org

@apc999

apc999 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

alluxio-bot, merge this please

@alluxio-bot

Copy link
Copy Markdown
Contributor

merge failed:
Merge refused because the PR has the label cla-missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alluxio fuse mount failed but report successfully

4 participants