Skip to content

Commit b4dd974

Browse files
committed
Delete subnode's machine directories
1 parent 0497d12 commit b4dd974

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmd/minikube/cmd/delete.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ func deleteProfile(profile *config.Profile) error {
329329

330330
// In case DeleteHost didn't complete the job.
331331
deleteProfileDirectory(profile.Name)
332+
deleteMachineDirectories(cc)
332333

333334
if err := deleteConfig(profile.Name); err != nil {
334335
return err
@@ -496,6 +497,15 @@ func deleteProfileDirectory(profile string) {
496497
}
497498
}
498499

500+
func deleteMachineDirectories(cc *config.ClusterConfig) {
501+
if cc != nil {
502+
for _, n := range cc.Nodes {
503+
machineName := driver.MachineName(*cc, n)
504+
deleteProfileDirectory(machineName)
505+
}
506+
}
507+
}
508+
499509
// killMountProcess kills the mount process, if it is running
500510
func killMountProcess() error {
501511
pidPath := filepath.Join(localpath.MiniPath(), constants.MountProcessFileName)

0 commit comments

Comments
 (0)