diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index fb1fe74..a5fe726 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -222,6 +222,13 @@ func (c *Cluster) migrateSeedMember() error { log.Infof("added the new member") // wait for the delay + if c.spec.Seed.RemoveDelay == 0 { + c.spec.Seed.RemoveDelay = 30 + } + if c.spec.Seed.RemoveDelay < 10 { + c.spec.Seed.RemoveDelay = 10 + } + delay := time.Duration(c.spec.Seed.RemoveDelay) * time.Second log.Infof("wait %v before remove the seed member", delay) time.Sleep(delay) diff --git a/pkg/cluster/spec.go b/pkg/cluster/spec.go index cf065c4..2c5498f 100644 --- a/pkg/cluster/spec.go +++ b/pkg/cluster/spec.go @@ -42,6 +42,6 @@ type SeedPolicy struct { MemberClientEndpoints []string // RemoveDelay specifies the delay to remove the original seed member from the // cluster in seconds. - // The seed member will be removed in 30s by default. + // The seed member will be removed in 30 second by default. Minimum delay is 10 seconds. RemoveDelay int }