Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added warning for changing mount configuration with KiC driver on exsting cluster #9172

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should exit rather than ignoring the user. Maybe something like:

exit.Error(reason.GuestMountConflict, "Sorry, {{.driver}} does not allow mounts to be changed after container creation (previous mount: {{.previous}}, new mount: {{.new}})")

(You would need to add a GuestMountConflict reason, but it shouldn't be too difficult to do so)

}
}

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)
}
}
}

Expand Down