Commit Graph
3 Commits
Author SHA1 Message Date
Omar Sobh c46206c6dd Polish: minimal clawstor-fuse.service (fixes morpheus mount EPERM)
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Failing after 3s
Live smoke on morpheus with the previous unit failed:
  Error: mounting FUSE at /home/osobh/clawstor-mount
  Caused by: Operation not permitted (os error 1)

But 'systemd-run --user' with the exact same binary worked, and
the manual invocation worked. The delta was our ExecStartPre
chain (mkdir + fusermount3 -u -z) — on some Ubuntu 24.04 builds
that combination poisons the subsequent mount syscall even with
the -z lazy flag + ignored exit code.

Fix: drop the pre-mkdir + pre-unmount. Operator creates the
mount dir manually once (documented in README). Restart handling
falls to systemd's Restart=on-failure + ExecStop unmount.

Verified live on morpheus with the minimal unit — active +
mount visible in <3s.
2026-07-14 14:31:41 -07:00
Omar Sobh 6071fdb7d9 Phase 6d hotfix: systemd ExecStart needs %h not ${VAR}
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 12s
status=203/EXEC means the exec path didn't resolve. systemd
expands %h (home) at parse time but does NOT expand ${VAR}
in the ExecStart executable position — only in ExecStart args.
Rewrote to use %h/clawstor-deploy/claw-fuse directly.
2026-07-14 12:30:52 -07:00
Omar Sobh b1fc463655 Phase 6d: systemd user unit for persistent FUSE mount
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 15s
Deploy artifact — not built into the binary tree. `deploy/systemd/
clawstor-fuse.service` + README with the install recipe.

Unit shape:
* Type=simple, blocks on the FUSE binary (unmount = SIGTERM).
* ExecStartPre = mkdir -p mount, best-effort lazy unmount of any
  stale prior mount (guards against a hard SIGKILL leaving the
  kernel with a dangling mount).
* Restart=on-failure, RestartSec=5 — recover from transient IO
  errors without operator involvement.
* Environment= for CLAWSTOR_FUSE_BIN / DATA / MOUNT so a
  `systemctl edit` drop-in retargets without editing the unit file.

Dependency chain: clawstor-fuse.service After= + Wants=
clawstor-cluster.service. FUSE reads only the on-disk state so
this is technically not needed for correctness — but keeps the
mount from spinning up on a node where the daemon is broken.
2026-07-14 12:29:32 -07:00