Skip to content

Commit

Permalink
Merge pull request #9955 from daehyeok/delete_machine_dirs
Browse files Browse the repository at this point in the history
Delete subnode's machine directories
  • Loading branch information
medyagh authored Dec 31, 2020
2 parents 8debd18 + b11190c commit 6d763a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/minikube/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ func deleteProfile(profile *config.Profile) error {

// In case DeleteHost didn't complete the job.
deleteProfileDirectory(profile.Name)
deleteMachineDirectories(cc)

if err := deleteConfig(profile.Name); err != nil {
return err
Expand Down Expand Up @@ -496,6 +497,15 @@ func deleteProfileDirectory(profile string) {
}
}

func deleteMachineDirectories(cc *config.ClusterConfig) {
if cc != nil {
for _, n := range cc.Nodes {
machineName := driver.MachineName(*cc, n)
deleteProfileDirectory(machineName)
}
}
}

// killMountProcess kills the mount process, if it is running
func killMountProcess() error {
pidPath := filepath.Join(localpath.MiniPath(), constants.MountProcessFileName)
Expand Down

0 comments on commit 6d763a1

Please sign in to comment.