Skip to content

Commit

Permalink
Align master plugin restoration logic with message
Browse files Browse the repository at this point in the history
Signed-off-by: Kichan Kwon <[email protected]>
  • Loading branch information
kichankwon committed Nov 26, 2023
1 parent e2e8cfb commit 30141f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/thin_entrypoint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,12 +590,13 @@ func main() {
fmt.Printf("Master plugin @ %q has been deleted. Allowing 45 seconds for its restoration...\n", masterConfigFilePath)
time.Sleep(10 * time.Second)

for range time.Tick(1 * time.Second) {
for i := 0; i < 35; i++ {
_, err = os.Stat(masterConfigFilePath)
if !os.IsNotExist(err) {
fmt.Printf("Master plugin @ %q was restored. Regenerating given configuration.\n", masterConfigFilePath)
break
}
time.Sleep(1 * time.Second)
}
}
masterConfigFilePath, err = opt.createMultusConfig()
Expand Down

0 comments on commit 30141f9

Please sign in to comment.