Skip to content

The mount-helper scripts match any fuse.s3 mount as ObjectFS, and --uninstall refuses over it #538

Open

Description

@scttfrdmn

Split out of #533, where the test that would have covered this could not assert a rule nobody has
decided.

What the scripts do today

scripts/preremove.sh's objectfs_mountpoints() and scripts/install.sh's live_mounts() decide
whether a /proc/mounts line is an ObjectFS mount with three case arms:

case "$fstype" in
    fuse.objectfs | fuse.s3) ;;
    fuse.*)
        [ "$device" = "objectfs" ] || continue
        ;;
    *) continue ;;
esac

The middle arm requires the device to be objectfs. The first arm does not — fuse.s3 matches
whatever the device is. So a mount created by some other program with -o subtype=s3 is treated as
ours.

Consequences, both in shipped code:

  • scripts/preremove.sh warns about it during package removal as if it were an ObjectFS mount left
    behind.
  • scripts/install.sh --uninstall (new in The release tarball and install.sh do not carry the mount helper #533) refuses to run while it exists, and tells the
    operator to objectfs unmount a path ObjectFS never mounted. That command will fail, leaving no
    way to finish the uninstall except reading the script.

-o subtype=s3 is not reserved. s3fs, goofys, and anything else layered on libfuse can produce it.

Why the first arm has fuse.s3 at all

internal/fuse sets Subtype: "s3" alongside FSName: "objectfs", so the kernel records fstype
fuse.s3 with device objectfs — not fuse.objectfs. The arm was added so a real ObjectFS mount
would be recognized.

It is now redundant. internal/adapter.buildMountOptions hardcodes FSName: "objectfs"
(adapter.go:955); the operator-facing key that could change it was removed by #180 for lack of a
reader. So every mount ObjectFS can currently produce has device=objectfs and is already matched by
the middle arm. Verified by mutation in #533: deleting | fuse.s3 from either script changes no
test outcome, and no fixture row can be written that isolates it without asserting the claim above.

The decision this issue is for

Either:

  1. Narrow it — drop | fuse.s3 so the device check applies to every fuse.* fstype. Correct for
    every mount ObjectFS can produce today, and stops claiming strangers' mounts. The risk is a future
    mount with a different FSName, which is the same hole Nine inert FUSE mount options were removed; plumb the four that name real go-fuse capabilities #180 left and would need a real fix anyway.
  2. Keep the union and fix the remedy — still match fuse.s3, but have --uninstall distinguish
    "ours" from "possibly ours" and offer umount rather than objectfs unmount for the latter, or
    degrade to a warning instead of a refusal.

(1) is the smaller change and the one the evidence supports; it is filed as its own issue only
because it is a behaviour change to a scriptlet already shipped in the .deb and .rpm, which is
not something to fold into a tarball-parity PR.

Whichever is chosen, the fixture in TestBothScriptsAgreeOnWhatAMountedObjectfsLooksLike
(internal/config/mount_helper_test.go) gains a somethingelse /mnt/stranger fuse.s3 row and the
comment recording the limitation comes out.

Activity

  1. added
    type: technical-debt
    priority: low
    area: build
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: buildpriority: lowtype: technical-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions