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 d6ab605 commit b2e409e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
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
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 b2e409e

Please sign in to comment.