Skip to content

Commit

Permalink
Merge pull request #7305 from tstromberg/conntrack-path
Browse files Browse the repository at this point in the history
none: Use LookPath to verify conntrack install
  • Loading branch information
medyagh authored Mar 29, 2020
2 parents 1e70286 + 1f31d25 commit 233f106
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,8 @@ func validateFlags(cmd *cobra.Command, drvName string) {
// conntrack is required starting with kubernetes 1.18, include the release candidates for completion
version, _ := util.ParseKubernetesVersion(getKubernetesVersion(nil))
if version.GTE(semver.MustParse("1.18.0-beta.1")) {
err := exec.Command("conntrack").Run()
if err != nil {
exit.WithCodeT(exit.Config, "The none driver requires conntrack to be installed for kubernetes version {{.k8sVersion}}", out.V{"k8sVersion": version.String()})

if _, err := exec.LookPath("conntrack"); err != nil {
exit.WithCodeT(exit.Config, "Sorry, Kubernetes v{{.k8sVersion}} requires conntrack to be installed in root's path", out.V{"k8sVersion": version.String()})
}
}
}
Expand Down

0 comments on commit 233f106

Please sign in to comment.