Skip to content

Commit

Permalink
Add upgrade documentation to kvm version warn
Browse files Browse the repository at this point in the history
  • Loading branch information
josedonizetti committed Jul 4, 2019
1 parent 5f84ae3 commit 9210b96
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019 The Kubernetes Authors All rights reserved.
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -870,7 +870,7 @@ func validateDriverVersion(vmDriver string) {

// if the driver doesn't have return any version, it is really old, we force a upgrade.
if len(v) == 0 {
exit.WithCode(exit.Failure, "Please upgrade the 'docker-machine-driver-kvm2'.")
exit.WithCode(exit.Failure, "Please upgrade the 'docker-machine-driver-kvm2'. %s", constants.KVMDocumentation)
}

vmDriverVersion, err := semver.Make(v)
Expand All @@ -886,13 +886,13 @@ func validateDriverVersion(vmDriver string) {
}

if vmDriverVersion.LT(minikubeVersion) {
console.Warning("The 'docker-machine-driver-kvm2' version is old. Please consider upgrading.")
console.Warning("The 'docker-machine-driver-kvm2' version is old. Please consider upgrading. %s", constants.KVMDocumentation)
}
}
}

// extractVMDriverVersion extracts the driver version.
// KVM and Hyperkit drivers support the `version` command, that display the information as:
// KVM and Hyperkit drivers support the 'version' command, that display the information as:
// version: vX.X.X
// commit: XXXX
// This method returns the version 'vX.X.X' or empty if the version isn't found.
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/start_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Copyright 2019 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
5 changes: 5 additions & 0 deletions pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,8 @@ const (
// GvisorURL is the url to download gvisor
GvisorURL = "https://storage.googleapis.com/gvisor/releases/nightly/2018-12-07/runsc"
)

const (
// KVMDocumentation the documentation of the KVM driver
KVMDocumentation = "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver"
)

0 comments on commit 9210b96

Please sign in to comment.