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

Need to manually copy the docker binary Fedora 29 #188

Closed
greenaussie opened this issue Dec 30, 2018 · 2 comments
Closed

Need to manually copy the docker binary Fedora 29 #188

greenaussie opened this issue Dec 30, 2018 · 2 comments
Labels

Comments

@greenaussie
Copy link

If you are reporting a bug, please use the template below:

Need to manually copy the docker binary Fedora 29

Presume due to disk partitioning, use of 'rename' command fails.

$ dvm --debug install 18.03.1-ce
The dvm home directory is: /home/richard/.dvm
dvm install 18.03.1-ce
Installing 18.03.1-ce...
2018/12/30 17:09:37 Checking if 18.03.1-ce can be found at https://download.docker.com/linux/static/stable/x86_64/docker-18.03.1-ce.tgz
2018/12/30 17:09:38 Downloading https://download.docker.com/linux/static/stable/x86_64/docker-18.03.1-ce.tgz
2018/12/30 17:10:29 Could not find a stable release for 18.03.1-ce, checking for a test release
2018/12/30 17:10:29 Checking if 18.03.1-ce can be found at https://download.docker.com/linux/static/test/x86_64/docker-18.03.1-ce.tgz
2018/12/30 17:10:30 Downloading https://download.docker.com/linux/static/test/x86_64/docker-18.03.1-ce.tgz

Attempted to fallback to downloading from the prerelease location after downloading from the stable location failed: Unable to copy /tmp/dvm719964574/docker-18.03.1-ce/docker/docker to /home/richard/.dvm/bin/docker/18.03.1-ce/docker: rename /tmp/dvm719964574/docker-18.03.1-ce/docker/docker /home/richard/.dvm/bin/docker/18.03.1-ce/docker: invalid cross-device link: Unable to copy /tmp/dvm300176997/docker-18.03.1-ce/docker/docker to /home/richard/.dvm/bin/docker/18.03.1-ce/docker: rename /tmp/dvm300176997/docker-18.03.1-ce/docker/docker /home/richard/.dvm/bin/docker/18.03.1-ce/docker: invalid cross-device link
[richard@green hellonode]$ dvm ls
	system (1.13.1)
	18.03.1-ce
->	18.06.1-ce
[richard@green hellonode]$ dvm use 18.03.1-ce
Now using Docker 18.03.1-ce
[richard@green hellonode]$ dvm current
system (1.13.1)
[richard@green hellonode]$ mv /tmp/dvm719964574/docker-18.03.1-ce/docker/* /home/richard/.dvm/bin/docker/18.03.1-ce/
[richard@green hellonode]$ dvm use 18.03.1-ce
Now using Docker 18.03.1-ce
[richard@green hellonode]$ dvm current
18.03.1-ce
[richard@green hellonode]$ 

What should it have done?

Command should have copied the docker binaries.

Helpful Context

Default disk partitioning:

/dev/mapper/fedora-home on /home type ext4 (rw,noatime,seclabel)

What version of dvm are you using?

$ dvm --version
Docker Version Manager version 1.0.1 (b5c28c8)

What is your Operating System?

Fedora 29

What is your shell (bash/powershell/cmd/fish)?

[richard@green hellonode]$ bash --version
GNU bash, version 4.4.23(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[richard@green hellonode]$ which bash
/usr/bin/bash

How did you install dvm (command-line,chocolatey,homebrew)?

command-line

Do you like kittens? 😸

haha sure.

@carolynvs
Copy link
Collaborator

carolynvs commented Dec 30, 2018

Oops! I think I found the offending line of code:

err = os.Rename(tmpPath, destPath)

We should either be smarter about detecting when we are crossing partitions, handle that particular error (falling back to a copy) or always use a copy (which is slower) every time.

I'll try to push out a new release for you to try out soon!

@carolynvs carolynvs added the bug label Dec 30, 2018
@carolynvs
Copy link
Collaborator

Alternatively, we could download temp files under the dvm home directory so that its always safe to do a rename. I think that I like that solution the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants