Skip to content

deps(ipfs): bump kubo to v0.41.0 and fix removed/no-op config#1168

Open
odesenfans wants to merge 1 commit into
mainfrom
od/kubo-0.41
Open

deps(ipfs): bump kubo to v0.41.0 and fix removed/no-op config#1168
odesenfans wants to merge 1 commit into
mainfrom
od/kubo-0.41

Conversation

@odesenfans

Copy link
Copy Markdown
Collaborator

Summary

Bumps the IPFS image from kubo:v0.37.0 to kubo:v0.41.0 across all
deployment compose files and fixes two configuration items that became
broken in the intervening releases.

1. Reprovider.* config keys REMOVED in 0.41

Kubo 0.38 merged the Provider and Reprovider sections into a single
Provide section. The v0.41 docs/config.md
explicitly marks Reprovider.Strategy as REMOVED (and
Reprovider.Interval → use Provide.DHT.Interval).

Our init script set this value on every container start
(ipfs config Reprovider.Strategy 'pinned'), so --migrate does not
help: the line errors on each boot. Switched to Provide.Strategy.

2. --enable-pubsub-experiment is now a no-op (silent breakage)

Per v0.41 source
(cmd/ipfs/kubo/daemon.go):

cmds.BoolOption(enablePubSubKwd, "DEPRECATED CLI flag. Use Pubsub.Enabled config instead.")
...
if psSet {
    log.Error("The --enable-pubsub-experiment flag is deprecated. Use Pubsub.Enabled config option instead.")
} else {
    pubsub = cfg.Pubsub.Enabled.WithDefault(false)
}

The flag value is no longer wired up, and Pubsub.Enabled defaults to
false. Since pyaleph relies on IPFS pubsub for peer liveness
(src/aleph/services/ipfs/pubsub.py, services/peers/publish.py,
services/peers/monitor.py), leaving this unchanged would silently
disable pubsub.

Fix: removed the dead flag from the daemon command and added
ipfs config Pubsub.Enabled --json 'true' to the init script.

Preserved

  • --migrate is kept so the on-disk repo migrates from v17 to v18 on
    first boot under 0.38+.

Operator upgrade notes

  • On nodes whose /data/ipfs volume was previously owned by root
    (e.g. an older deployment that ran the container as root), the new
    image runs as ipfs (UID 1000) and the entrypoint's auto-chown can
    be slow on large volumes. Operators may want to run a manual
    chown -R 1000:100 /var/lib/docker/volumes/<...>/_data ahead of the
    bump. This is unchanged behaviour vs. 0.37 (the kubo Dockerfile has
    set ipfs:users ownership for years); only volumes with mismatched
    history are affected.

Test plan

  • Deploy on a staging node previously running kubo:v0.37.0,
    confirm: daemon starts, ipfs config Pubsub.Enabled returns
    true, ipfs config Provide.Strategy returns pinned, no
    Reprovider.Strategy errors in 001-update-ipfs-config.sh logs.
  • Verify pyaleph peer liveness messages keep flowing on the IPFS
    pubsub topic after upgrade.
  • Confirm repo migration v17 → v18 runs once on first boot.

Kubo 0.38 merged Reprovider into Provide and removed Reprovider.* keys;
the init script's `ipfs config Reprovider.Strategy 'pinned'` now errors
on every container start. Switch to `Provide.Strategy`.

The --enable-pubsub-experiment daemon flag became a no-op in kubo 0.38;
it only logs a deprecation error and does NOT enable pubsub. Since
Pubsub.Enabled defaults to false and pyaleph relies on IPFS pubsub for
peer liveness, drop the flag and set `Pubsub.Enabled=true` in config.

The --migrate flag is preserved so the repo migrates from v17 to v18
automatically on first boot under 0.41.

@foxpatch-aleph foxpatch-aleph left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctly bumps kubo from v0.37.0 to v0.41.0 across all 4 compose files. Replaces the removed Reprovider.Strategy config key with Provide.Strategy, removes the no-op --enable-pubsub-experiment daemon flag (sets Pubsub.Enabled via config instead), and preserves all other settings. All changes are verified against kubo v0.41.0 source and config docs. Clean, well-researched, and focused PR.

deployment/scripts/001-update-ipfs-config.sh (line 21): Verified against kubo v0.41.0 source: Pubsub.Enabled is type flag (boolean, default false), and --json 'true' correctly sets a JSON boolean. The --enable-pubsub-experiment daemon flag was confirmed to be a no-op (only logs deprecation error, value not wired up) at cmd/ipfs/kubo/daemon.go:424-428.

deployment/scripts/001-update-ipfs-config.sh (line 17): Verified against kubo v0.41.0 config.md: Reprovider.Strategy is REMOVED and replaced by Provide.Strategy. Value 'pinned' is a documented valid strategy.

deployment/docker-build/docker-compose.yml (line 55): Pre-existing (not introduced by this PR): bind mount ./001-update-ipfs-config.sh does not exist at deployment/docker-build/001-update-ipfs-config.sh. The script lives at deployment/scripts/001-update-ipfs-config.sh.

deployment/docker-build/dev/docker-compose.yml (line 125): Pre-existing (not introduced by this PR): same bind mount issue as the other compose files.

deployment/samples/docker-compose/docker-compose.yml (line 113): Pre-existing (not introduced by this PR): same bind mount issue as the other compose files.

deployment/samples/docker-monitoring/docker-compose.yml (line 115): Pre-existing (not introduced by this PR): same bind mount issue as the other compose files.

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.

2 participants