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

go-ipfs rc1/2 from dist.ipfs.io fails to install migrations #3661

Closed
hsanjuan opened this issue Feb 7, 2017 · 2 comments
Closed

go-ipfs rc1/2 from dist.ipfs.io fails to install migrations #3661

hsanjuan opened this issue Feb 7, 2017 · 2 comments
Labels
kind/bug A bug in existing code (including security flaws) topic/repo Topic repo
Milestone

Comments

@hsanjuan
Copy link
Contributor

hsanjuan commented Feb 7, 2017

Version information:

go-ipfs version: 0.4.5-rc1-
Repo version: 5
System version: arm/linux
Golang version: go1.7.4

Type:

Bug

Priority: P1

Description:

ipfs@tuvok:/opt/go-ipfs $ ./ipfs daemon
Initializing daemon...
Found outdated fs-repo, migrations need to be run.
Run migrations now? [y/N] y
  => Looking for suitable fs-repo-migrations binary.
  => None found, downloading.
  => Failed to download fs-repo-migrations.
The migrations of fs-repo failed:
  failed to download latest fs-repo-migrations: failed to run ldd: exit status 1
If you think this is a bug, please file an issue and include this whole log output.
  https://github.com/ipfs/fs-repo-migrations
Error: failed to download latest fs-repo-migrations: failed to run ldd: exit status 1

ldd complains:

ipfs@tuvok:/opt/go-ipfs $ ldd ipfs 
	not a dynamic executable

IPFS was downloaded from dist.ipfs.io. It seems it is statically built.
https://github.com/ipfs/go-ipfs/blob/master/repo/fsrepo/migrations/migrations.go#L256 fails to run when it tries to guess if we are using musl (I'm not sure we provide musl builds for repo migrations anyway).

@hsanjuan hsanjuan added kind/bug A bug in existing code (including security flaws) topic/repo Topic repo labels Feb 7, 2017
@Kubuxu
Copy link
Member

Kubuxu commented Feb 7, 2017

We should provide them as docker containers that run our Dockerfiles run with musl.

@ghost
Copy link

ghost commented Feb 7, 2017

Will take care of it tonight -- will change the ldd check to ldd --version, which prints libc information. For the case that ldd is unavailable or broken, we'll disregard the respective error and assume glibc. We shouldn't have this whole code path fail just because the musl check fails.

@ghost ghost self-assigned this Feb 7, 2017
@ghost ghost added this to the ipfs 0.4.5 milestone Feb 7, 2017
ghost pushed a commit that referenced this issue Feb 8, 2017
Fixes #3661.

There are a couple of cases in which ldd won't operate on an executable,
for example when the executable is statically linked.

This patch makes the call to ldd to ldd more resilient against errors,
and looks for the system libc, instead of the libc go-ipfs was linked against.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
@ghost ghost added status/in-progress In progress labels Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/repo Topic repo
Projects
None yet
Development

No branches or pull requests

3 participants