Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ipfs: prepare for autoMigrate fix #29942

Merged
merged 2 commits into from Oct 4, 2017
Merged

Ipfs: prepare for autoMigrate fix #29942

merged 2 commits into from Oct 4, 2017

Conversation

elitak
Copy link
Contributor

@elitak elitak commented Sep 30, 2017

Motivation for this change

I was trying the dev branch of ipfs v0.11 and found that the services.ipfs.autoMigrate option was broken. The daemon tries to download and run a golang binary that is improperly linked and can't even be patchelfed, not to mention the pre-start script fails before it even gets to that point, because of the repo version mismatch.

The best approach I see right now is do the migration automatically ourselves, rather than relying on the daemon's fault-prone internal method. The first step is to detect the actual ipfs repo version by looking at /var/lib/ipfs/version, then determining the version the installed binary wants (hard, since ipfs version --all refuses to run, IIRC, which may be an upstream bug that needs to be filed). Finally, we can run the appropriate X-to-Y binaries, in order, provided in the new ipfs-migrator package, to get to the correct version, then launch the daemon.

Things done

I've disabled the autoMigrate option in services.ipfs. I'm including a build of the migration tools so that re-adding the autoMigrate feature is easier on whomever ends up fixing the option.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@fpletz fpletz self-assigned this Oct 3, 2017
@fpletz fpletz merged commit d6f7e2f into NixOS:master Oct 4, 2017
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.

None yet

2 participants