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

404 Not Found - for migration on OpenBSD #100

Closed
stensonb opened this issue May 12, 2020 · 9 comments · Fixed by ipfs/distributions#299
Closed

404 Not Found - for migration on OpenBSD #100

stensonb opened this issue May 12, 2020 · 9 comments · Fixed by ipfs/distributions#299
Labels
need/triage Needs initial labeling and prioritization

Comments

@stensonb
Copy link
Contributor

I'm in the process of updating the ipfs package/port for OpenBSD, and have noticed fs-migrations fail.

The current package/port builds ipfs-0.4.22, and when attempting to run the ipfs-0.5.1 binary (easily built with make build), I see the following error:

$ ipfs daemon 
Initializing daemon...
go-ipfs version: 0.5.1-8431e2e87
Repo version: 9
System version: amd64/openbsd
Golang version: go1.13.9
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: GET https://ipfs.io/ipfs/QmUgfXycSjF9R8F4Tyauaz6LZ4bj5nbksg54G9GdF4fit6/fs-repo-migrations/v1.5.1/fs-repo-migrations_v1.5.1_openbsd-amd64.tar.gz error: 404 Not Found: ipfs resolve -r /ipfs/QmUgfXycSjF9R8F4Tyauaz6LZ4bj5nbksg54G9GdF4fit6/fs-repo-migrations/v1.5.1/fs-repo-migrations_v1.5.1_openbsd-amd64.tar.gz: no link named "fs-repo-migrations_v1.5.1_openbsd-amd64.tar.gz" under QmWgjNoXVSfZXJAG5LaovdDHMn7nT8hJGzXVeVHMq6fxy4

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: GET https://ipfs.io/ipfs/QmUgfXycSjF9R8F4Tyauaz6LZ4bj5nbksg54G9GdF4fit6/fs-repo-migrations/v1.5.1/fs-repo-migrations_v1.5.1_openbsd-amd64.tar.gz error: 404 Not Found: ipfs resolve -r /ipfs/QmUgfXycSjF9R8F4Tyauaz6LZ4bj5nbksg54G9GdF4fit6/fs-repo-migrations/v1.5.1/fs-repo-migrations_v1.5.1_openbsd-amd64.tar.gz: no link named "fs-repo-migrations_v1.5.1_openbsd-amd64.tar.gz" under QmWgjNoXVSfZXJAG5LaovdDHMn7nT8hJGzXVeVHMq6fxy4

$

I'd like for this to work so updating a the go-ipfs package from the older (0.4.22) version to the newer (0.5.1 and beyond) will "just work".

I suspect some work needs to be done to remove the $GOOS ("openbsd" here) details from the filename...how different can these be between linux and openbsd?

@stensonb stensonb added the need/triage Needs initial labeling and prioritization label May 12, 2020
@stensonb
Copy link
Contributor Author

Downloading this repo, and running the migration manually seems to work fine:

$ go get -u github.com/ipfs/fs-repo-migrations
go: downloading golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa
go: extracting golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa
go: finding golang.org/x/net latest
go: downloading golang.org/x/net v0.0.0-20200506145744-7e3656a0809f
go: extracting golang.org/x/net v0.0.0-20200506145744-7e3656a0809f
$ fs-repo-migrations                                                                                                                                                                                                     
Found fs-repo version 7 at /<path_redacted>/.ipfs
Do you want to upgrade this to version 9? [y/n] y
===> Running migration 7 to 8...
applying 7-to-8 repo migration
locking repo at "/<path_redacted>/.ipfs"
  - verifying version is '7'
> Upgrading config to new format
updated version file
===> Migration 7 to 8 succeeded!
===> Running migration 8 to 9...
applying 8-to-9 repo migration
updated version file
===> Migration 8 to 9 succeeded!
$

So, perhaps we just need to add the openbsd GOOS binary here?

@Stebalien
Copy link
Member

We distribute through https://github.com/ipfs/distributions which doesn't appear to support OpenBSD. I'll look into adding support now.

@Stebalien
Copy link
Member

Fixed and released. Note: I've also uploaded OpenBSD binary builds to dist.ipfs.io.

@stensonb
Copy link
Contributor Author

tested and confirmed from my end. thanks!

@stensonb
Copy link
Contributor Author

strange...it was working...now I'm getting a 404 again. :(

@Stebalien
Copy link
Member

Stebalien commented May 13, 2020 via email

@stensonb
Copy link
Contributor Author

stensonb commented May 13, 2020

OpenBSD amd64

$ curl https://ipfs.io/ipfs/QmUgfXycSjF9R8F4Tyauaz6LZ4bj5nbksg54G9GdF4fit6/fs-repo-migrations/v1.5.1/fs-repo-migrations_v1.5.1_openbsd-amd64.tar.gz

@Stebalien
Copy link
Member

Ah... I forgot. go-ipfs hard-codes the dist URL so we can't really fix this without a release.

Options:

  1. Download and run the migrations manually.
  2. Ship the migration binary along with go-ipfs.
  3. Set the IPFS_DIST_PATH env variable to a new URL with the migrations. Specifically, https://ipfs.io/ipfs/QmXuKUDChMXkcq36CbaggvY3UaAtgpi7yyoAiNy5VD9Dfr.
  4. Apply fix: update dists url for OpenBSD support kubo#7311

Given that you're shipping a port, option 4 is probably the best.

@stensonb
Copy link
Contributor Author

stensonb commented May 13, 2020

makes sense to me. i just verified #3 works. i'll work to add a patch to the code locally when building for OpenBSD (#4).

thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants