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

Ubuntu: error for minikube cache add images #4438

Closed
fenglixa opened this issue Jun 6, 2019 · 4 comments · Fixed by #4439
Closed

Ubuntu: error for minikube cache add images #4438

fenglixa opened this issue Jun 6, 2019 · 4 comments · Fixed by #4439

Comments

@fenglixa
Copy link
Contributor

fenglixa commented Jun 6, 2019

The exact command to reproduce the issue:
$ minikube cache add ubuntu:16.04

The full output of the command that failed:
$ minikube cache add ubuntu:16.04

💣 Failed to cache and load images: Error creating new ssh host from driver: Error getting ssh host name for driver: driver does not support ssh commands

😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new

The output of the minikube logs command:
None
The operating system version:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04

@fenglixa
Copy link
Contributor Author

fenglixa commented Jun 6, 2019

Checked the code. Why the logic of return error directly if the driver is none?

  • none.go:
// GetSSHHostname returns hostname for use with ssh
func (d *Driver) GetSSHHostname() (string, error) {
	return "", fmt.Errorf("driver does not support ssh commands")   =====>>> Here
}

// GetSSHPort returns port for use with ssh
func (d *Driver) GetSSHPort() (int, error) {
	return 0, fmt.Errorf("driver does not support ssh commands")
}

@fenglixa
Copy link
Contributor Author

fenglixa commented Jun 6, 2019

Modified minikube code locally and setup password-less to localhost. I workarounded this issue:

$ ssh-copy-id -i ~/.ssh/id_rsa.pub 127.0.0.1
... ...
$ /opt/minikube# out/minikube cache add ubuntu:16.04
$ /opt/minikube# out/minikube cache list
ubuntu:16.04

@afbjorklund
Copy link
Collaborator

This can be fixed by switching runner for the none driver, run the load command locally instead of over ssh. It can also skip the copy step.

@afbjorklund
Copy link
Collaborator

Also note that caching is now disabled by default for the none driver, since the container runtime storage is persistent anyway.

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

Successfully merging a pull request may close this issue.

2 participants