Merge pull request #12716 from spowelljr/fixHyperVStop

Kill mount process before stopping nodes
pull/12730/head
Steven Powell 2021-10-18 14:33:09 -07:00 committed by GitHub
commit c073e65c6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

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