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

minikube: Add the kvm2 driver #39438

Closed
wants to merge 1 commit into from
Closed

Conversation

shosti
Copy link
Contributor

@shosti shosti commented Apr 24, 2018

Motivation for this change

The docker-machine-kvm driver is considered deprecated should be replaced with
the docker-machine-kvm2 driver (which is maintained by the minikube team).

See #34448

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

The docker-machine-kvm driver is considered deprecated should be replaced with
the docker-machine-kvm2 driver (which is maintained by the minikube team).

See NixOS#34448
Copy link
Member

@nlewo nlewo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does minikube work fine with this driver?

sha256 = "1wc2gvmgb59yh0ldm2plvh6s8mvxvysrxp6w75z16ii86jmi3wr6";
};

docker-machine-kvm2 = buildGoPackage rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move out this expression and put it close to the docker-machine-kvm attribute?

@flokli
Copy link
Contributor

flokli commented Apr 26, 2018

Builds for me, but virtual machine provisioning fails:

result-bin/bin/minikube start --vm-driver kvm2                                                       1 ↵
Starting local Kubernetes v0.0.0-master+72c6d3d62 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v0.0.0-master+72c6d3d62
Downloading kubelet v0.0.0-master+72c6d3d62
E0426 19:18:14.660332   19010 start.go:234] Error updating cluster:  downloading binaries: downloading kubelet: Error downloading kubelet v0.0.0-master+72c6d3d62: failed to download: failed to download to temp file: download failed: 1 error(s) occurred:

* received invalid status code: 404 (expected 200)

commit-ish 72c6d3d62 from v0.0.0-master+72c6d3d62 version string corresponds to the v0.26.0 tag on the minikube repo, but somehow minikube doesn't know its version - I suspect hack/get_k8s_version.py not working correctly in our build environment.

@shosti
Copy link
Contributor Author

shosti commented Apr 26, 2018

Hmm it worked for me building on 18.03, will check again in a bit...

@flokli
Copy link
Contributor

flokli commented Apr 26, 2018

unstable here, with sandbox enabled.

@nlewo
Copy link
Member

nlewo commented Apr 27, 2018

The git dependency fails to build for me.
@GrahamcOfBorg build minikube

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: minikube

Partial log (click to expand)

/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/jenkins/common.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/jenkins/release_github_page.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/jenkins/release_update_installers.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/jenkins/release_build_and_upload.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/jenkins/osx_integration_tests_hyperkit.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/godeps/godep-save.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/godeps/godep-update-k8s.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0/share/go/src/k8s.io/minikube/hack/godeps/godep-restore.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/kx938ch925sh2c81x6rwnjnw2g3805ca-minikube-0.26.0...
/nix/store/k2zs1s8sr6sc4c0fh5dik5pgsvpq3kfh-minikube-0.26.0-bin

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: minikube

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/knjdg75l9fzxhnyrr8jjrmgb68m4w22g-gpgme-1.11.1-dev/lib  /nix/store/knjdg75l9fzxhnyrr8jjrmgb68m4w22g-gpgme-1.11.1-dev/bin
patching script interpreter paths in /nix/store/knjdg75l9fzxhnyrr8jjrmgb68m4w22g-gpgme-1.11.1-dev
/nix/store/knjdg75l9fzxhnyrr8jjrmgb68m4w22g-gpgme-1.11.1-dev/bin/gpgme-config: interpreter directive changed from "/bin/sh" to "/nix/store/adw9jx59wnrh5659wz43nbjya3m4b3gl-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/knjdg75l9fzxhnyrr8jjrmgb68m4w22g-gpgme-1.11.1-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/850mma3fy260px98sqrpddwbqmc4b8d3-gpgme-1.11.1-info
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/850mma3fy260px98sqrpddwbqmc4b8d3-gpgme-1.11.1-info
checking for references to /build in /nix/store/850mma3fy260px98sqrpddwbqmc4b8d3-gpgme-1.11.1-info...
cannot build derivation '/nix/store/3n5klaks7a8n66zw0j24azvfslshpf8n-minikube-0.26.0.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/3n5klaks7a8n66zw0j24azvfslshpf8n-minikube-0.26.0.drv' failed

@nlewo
Copy link
Member

nlewo commented Apr 27, 2018

Hmm, that strange because for me and Hydra a dependency of minikube cannot be build:

$ git log -n1 --oneline 
c24a7f1ada6 (HEAD -> pr-39438) minikube: Add the kvm2 driver

$ nix-instantiate -A minikube.all | tail -n1 | xargs nix-store -qR | grep kubernetes
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/ap9adnrvrmd04fvl3ia5is2z4x8nrbsr-kubernetes-1.9.1.drv

This derivation is failing on Hydra https://hydra.nixos.org/build/73254958#tabs-summary.

Can you rebase onto master?

(note I don't know which nixpkgs commit ofborg is checking out...)

@akazakov
Copy link
Contributor

@flokli I got the same error, which I was able to get around by providing the version explicitly
minikube start --kubernetes-version v1.10.0 --vm-driver kvm2

All seems to work after that

Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
Finished Downloading kubeadm v1.10.0
Finished Downloading kubelet v1.10.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

@flokli
Copy link
Contributor

flokli commented Apr 30, 2018

@nlewo I did rebase on latest nixos-unstable (channels/nixos-unstable), minikube evaluated to /nix/store/k2zs1s8sr6sc4c0fh5dik5pgsvpq3kfh-minikube-0.26.0-bin.

@akazakov Passing the version manually works for me. Can you check if passing it automatically works if we patch hack/get_k8s_version.py to the version we're trying to build?

@flokli
Copy link
Contributor

flokli commented Jun 29, 2018

superseded by #41644 which got merged. @nlewo, close?

@andir andir closed this Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants