Skip to content

Commit eb45f76

Browse files
authored
Merge pull request #2113 from xrwang8/master
fix : redeployment failure when internal ip is modified
2 parents 6f4455c + 45abd09 commit eb45f76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/kk/pkg/bootstrap/os/tasks.go

+3
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ func (r *RemoveFiles) Execute(runtime connector.Runtime) error {
258258
for _, file := range clusterFiles {
259259
_, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("rm -rf %s", file), true)
260260
}
261+
// remove pki/etcd Path if it exists, otherwise it will cause the etcd reinstallation to fail if ip change
262+
pkiPath := fmt.Sprintf("%s/pki/etcd", runtime.GetWorkDir())
263+
_, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("rm -rf %s", pkiPath), true)
261264
return nil
262265
}
263266

0 commit comments

Comments
 (0)