diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index a9fdf082d49d32d8b7a9ba19ae75c0a3c25e28bc..03e76c6000365a75cf97c697ef18b207a227256c 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 {{.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") + } + } + + 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) + } } }