Skip to content

initipfscluster: self-heal a directory-shaped identity.json#244

Merged
ehsan6sha merged 1 commit into
mainfrom
fix/ipfs-cluster-identity-dir-wedge
Jun 18, 2026
Merged

initipfscluster: self-heal a directory-shaped identity.json#244
ehsan6sha merged 1 commit into
mainfrom
fix/ipfs-cluster-identity-dir-wedge

Conversation

@ehsan6sha

Copy link
Copy Markdown
Member

Problem

A plugin's file bind-mount of /uniondrive/ipfs-cluster/identity.json (blox-ai) makes the Docker daemon auto-create the path as a directory when the real file is absent at container-create time. initipfscluster then panics on os.WriteFile over the directory, leaving ipfs-cluster permanently wedged (its init loops forever on [ -f identity.json ]).

Change

modules/initipfscluster/main.go: stat the identity path and os.RemoveAll a directory before writing, so the real (deterministic) identity file is regenerated rather than panicking.

Defense-in-depth alongside the fula-ota go-fula.sh guard and the readiness-check.py self-heal (see the functionland/fula-ota PR). Verified with go build.

🤖 Generated with Claude Code

A plugin's file bind-mount (blox-ai) can make dockerd auto-create
/uniondrive/ipfs-cluster/identity.json as a DIRECTORY when the real file is
absent at container-create time. os.WriteFile then fails ("is a directory")
and initipfscluster panics, leaving ipfs-cluster permanently wedged. Stat the
path and os.RemoveAll a directory before writing so the real (deterministic)
identity file is regenerated. Pairs with the fula-ota go-fula.sh guard and the
readiness-check self-heal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ehsan6sha ehsan6sha merged commit 8b4e5fd into main Jun 18, 2026
3 of 9 checks passed
@ehsan6sha ehsan6sha deleted the fix/ipfs-cluster-identity-dir-wedge branch June 18, 2026 20:48
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.

1 participant