From 2b2220ac8b661a4b128590d5d9f9658315b7ed66 Mon Sep 17 00:00:00 2001 From: Asare Worae Date: Thu, 3 Sep 2020 09:51:11 +0200 Subject: [PATCH 1/3] added warning for changing mount configuration with KiC dirver on existing cluster --- cmd/minikube/cmd/start.go | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index a9fdf082d49d..9182a8ff855a 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -206,14 +206,24 @@ func runStart(cmd *cobra.Command, args []string) { } } - if existing != nil && existing.KubernetesConfig.ContainerRuntime == "crio" && driver.IsKIC(existing.Driver) { - // Stop and start again if it's crio because it's broken above v1.17.3 - out.WarningT("Due to issues with CRI-O post v1.17.3, we need to restart your cluster.") - out.WarningT("See details at https://github.com/kubernetes/minikube/issues/8861") - stopProfile(existing.Name) - starter, err = provisionWithDriver(cmd, ds, existing) - if err != nil { - exit.Error(reason.GuestProvision, "error provisioning host", err) + if existing != nil && driver.IsKIC(existing.Driver) { + if viper.GetBool(createMount) { + mount := viper.GetString(mountString) + if len(existing.ContainerVolumeMounts) != 1 || existing.ContainerVolumeMounts[0] != mount { + out.WarningT("Due to the limitations of %s, it's not possible to change mount configuration of an existing cluster.", out.V{"driver": existing.Driver}) + out.WarningT("If necessary delete and recreate the cluster, proceeding with old mount configuration") + } + } + + if existing.KubernetesConfig.ContainerRuntime == "crio" { + // Stop and start again if it's crio because it's broken above v1.17.3 + out.WarningT("Due to issues with CRI-O post v1.17.3, we need to restart your cluster.") + out.WarningT("See details at https://github.com/kubernetes/minikube/issues/8861") + stopProfile(existing.Name) + starter, err = provisionWithDriver(cmd, ds, existing) + if err != nil { + exit.Error(reason.GuestProvision, "error provisioning host", err) + } } } From 5ae5be7141580ca8db82970d370c66ae5cf47a8f Mon Sep 17 00:00:00 2001 From: Asare Worae Date: Thu, 3 Sep 2020 10:01:19 +0200 Subject: [PATCH 2/3] fixed misuse of template variable --- cmd/minikube/cmd/start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 9182a8ff855a..04b06896f8cf 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -210,7 +210,7 @@ func runStart(cmd *cobra.Command, args []string) { if viper.GetBool(createMount) { mount := viper.GetString(mountString) if len(existing.ContainerVolumeMounts) != 1 || existing.ContainerVolumeMounts[0] != mount { - out.WarningT("Due to the limitations of %s, it's not possible to change mount configuration of an existing cluster.", out.V{"driver": existing.Driver}) + out.WarningT("Due to the limitations of {{.driver}}, it's not possible to change mount configuration of an existing cluster.", out.V{"driver": existing.Driver}) out.WarningT("If necessary delete and recreate the cluster, proceeding with old mount configuration") } } From 229969aa540e97962fa6d3e203be4686cbd8ddc0 Mon Sep 17 00:00:00 2001 From: Asare Worae Date: Thu, 3 Sep 2020 10:02:07 +0200 Subject: [PATCH 3/3] fix grammer --- cmd/minikube/cmd/start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 04b06896f8cf..03e76c600036 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -210,7 +210,7 @@ func runStart(cmd *cobra.Command, args []string) { if viper.GetBool(createMount) { mount := viper.GetString(mountString) if len(existing.ContainerVolumeMounts) != 1 || existing.ContainerVolumeMounts[0] != mount { - out.WarningT("Due to the limitations of {{.driver}}, it's not possible to change mount configuration of an existing cluster.", out.V{"driver": existing.Driver}) + out.WarningT("Due to the limitations of {{.driver}}, it's not possible to the change mount configuration of an existing cluster.", out.V{"driver": existing.Driver}) out.WarningT("If necessary delete and recreate the cluster, proceeding with old mount configuration") } }