From 645b739d88556a8af0eb7ca1f8a0cda86c0b6b91 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Fri, 15 Oct 2021 10:52:39 -0700 Subject: [PATCH] kill mount before stopping nodes --- cmd/minikube/cmd/stop.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index fef1b5674cea..6990fdc23daf 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -130,6 +130,10 @@ func stopProfile(profile string) int { api, cc := mustload.Partial(profile) defer api.Close() + if err := killMountProcess(); err != nil { + out.WarningT("Unable to kill mount process: {{.error}}", out.V{"error": err}) + } + for _, n := range cc.Nodes { machineName := config.MachineName(*cc, n) @@ -139,10 +143,6 @@ func stopProfile(profile string) int { } } - if err := killMountProcess(); err != nil { - out.WarningT("Unable to kill mount process: {{.error}}", out.V{"error": err}) - } - if !keepActive { if err := kubeconfig.DeleteContext(profile, kubeconfig.PathFromEnv()); err != nil { exit.Error(reason.HostKubeconfigDeleteCtx, "delete ctx", err)