Merge pull request #9955 from daehyeok/delete_machine_dirs
Delete subnode's machine directoriespull/10076/head
commit
6d763a1cc7
|
@ -329,6 +329,7 @@ func deleteProfile(profile *config.Profile) error {
|
||||||
|
|
||||||
// In case DeleteHost didn't complete the job.
|
// In case DeleteHost didn't complete the job.
|
||||||
deleteProfileDirectory(profile.Name)
|
deleteProfileDirectory(profile.Name)
|
||||||
|
deleteMachineDirectories(cc)
|
||||||
|
|
||||||
if err := deleteConfig(profile.Name); err != nil {
|
if err := deleteConfig(profile.Name); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -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
|
// killMountProcess kills the mount process, if it is running
|
||||||
func killMountProcess() error {
|
func killMountProcess() error {
|
||||||
pidPath := filepath.Join(localpath.MiniPath(), constants.MountProcessFileName)
|
pidPath := filepath.Join(localpath.MiniPath(), constants.MountProcessFileName)
|
||||||
|
|
Loading…
Reference in New Issue