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

Migration failure suggests update failed, but latest version was left in-place #164

Open
placer14 opened this issue Jun 24, 2022 · 0 comments

Comments

@placer14
Copy link

placer14 commented Jun 24, 2022

Version information:

v0.10.0

Description:

Attempting to update IPFS from v0.10.0 to v0.13.0. using ipfs-update v0.10.0 (installed via GO111MODULE=on go get github.com/ipfs/ipfs-update). This produced a few errors which suggests failure but actually worked.

The failures include:

  • unable to access ipfs binary (didn't seem to update binary)
  • unable to acquire repo lock (left the new binary in place)

(see command output details)

Command Output:

Unable to reproduce failure output as update is idempotent and doesn't seem to hit the problem again.

Verbose Output

Installation:

[12:17:30] $ GO111MODULE=on go get github.com/ipfs/ipfs-update
go: downloading github.com/ipfs/ipfs-update v1.8.0
go: downloading github.com/ipfs/go-ipfs v0.12.0
go: downloading github.com/whyrusleeping/stump v0.0.0-20160611222256-206f8f13aae1
go: downloading golang.org/x/sys v0.0.0-20211025112917-711f33c9992c
go: downloading github.com/blang/semver v3.5.1+incompatible
go: downloading github.com/ipfs/go-ipfs-api v0.3.0
go: downloading github.com/whyrusleeping/tar-utils v0.0.0-20180509141711-8c6c8ba81d5c
go: downloading github.com/libp2p/go-libp2p-core v0.11.0
go: downloading lukechampine.com/blake3 v1.1.6
go: downloading github.com/ipfs/go-ipfs-config v0.18.0
go: downloading github.com/ipfs/go-ipld-legacy v0.1.0
go: downloading github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2
go get: installing executables with 'go get' in module mode is deprecated.
	Use 'go install pkg@version' instead.
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.


[12:18:06] $ ipfs-update version
v0.10.0


[12:18:34] $ ipfs-update versions
Error fetching: ipfs api shell not up
Fetching with HTTP: "https://ipfs.io/ipns/dist.ipfs.io/go-ipfs/versions"
v0.13.0
v0.13.0-rc1
v0.12.2
v0.12.1
v0.12.0
v0.12.0-rc1
v0.11.1
v0.11.0
....


[12:19:22] $ ipfs-update install v0.13.0
fetching go-ipfs version v0.13.0
Error fetching: ipfs api shell not up
Fetching with HTTP: "https://ipfs.io/ipns/dist.ipfs.io/go-ipfs/v0.13.0/go-ipfs_v0.13.0_darwin-arm64.tar.gz"
Fetching with HTTP: "https://ipfs.io/ipns/dist.ipfs.io/go-ipfs/v0.13.0/go-ipfs_v0.13.0_darwin-arm64.tar.gz"
binary downloaded, verifying...
success! tests all passed.
stashing old binary
install failed, reverting changes...
ERROR: install failed: could not move old binary: remove /usr/local/bin/ipfs: permission denied


[mg@europa:~]
[12:22:13] $ ls -al /usr/local/bin/ipfs
-rwxr-xr-x  1 mg  staff  50106752 Oct  1  2021 /usr/local/bin/ipfs

[mg@europa:~]
[12:22:20] $ rm /usr/local/bin/ipfs
rm: /usr/local/bin/ipfs: Permission denied

[mg@europa:~]
[12:22:34] $ sudo rm /usr/local/bin/ipfs

[mg@europa:~]
[12:22:43] $ ipfs-update install v0.13.0
fetching go-ipfs version v0.13.0
Error fetching: ipfs api shell not up
Fetching with HTTP: "https://ipfs.io/ipns/dist.ipfs.io/go-ipfs/v0.13.0/go-ipfs_v0.13.0_darwin-arm64.tar.gz"
binary downloaded, verifying...
success! tests all passed.
checking if we should install in GOPATH: /Users/mg/go/bin
installing new binary to /Users/mg/go/bin/ipfs
checking if repo migration is needed...
  check complete, migration required.
Looking for suitable migration binaries.
Need 1 migrations, downloading.
Downloading migration: fs-repo-11-to-12...
Error fetching: ipfs api shell not up
Fetching with HTTP: "https://ipfs.io/ipns/dist.ipfs.io/fs-repo-11-to-12/versions"
Error fetching: ipfs api shell not up
Fetching with HTTP: "https://ipfs.io/ipns/dist.ipfs.io/fs-repo-11-to-12/v1.0.2/fs-repo-11-to-12_v1.0.2_darwin-arm64.tar.gz"
Downloaded and unpacked migration: /tmp/migrations2655223284/fs-repo-11-to-12 (v1.0.2)
Running migration fs-repo-11-to-12 ...
  => Running: /tmp/migrations2655223284/fs-repo-11-to-12 -path=/Users/mg/.ipfs -verbose=true
applying 11-to-12 repo migration
locking repo at "/Users/mg/.ipfs"
error: failed to acquire repo lock at /Users/mg/.ipfs/repo.lock
Is a daemon running? please stop it before running migration
ERROR: Migration Failed:  migration fs-repo-11-to-12 failed: exit status 1
install failed, reverting changes...
ERROR: install failed: migration fs-repo-11-to-12 failed: exit status 1

# repo.lock is present, removing
[12:28:54] $ rm -rf ~/.ipfs/repo.lock 

[mg@europa:~]
[12:29:06] $ sudo ipfs-update install v0.13.0
Password:
Already have version v0.13.0 installed, skipping.

Installation complete!

[mg@europa:~]
[12:32:01] $ ipfs version
ipfs version 0.13.0


# insert confusion

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

No branches or pull requests

1 participant