make check condition more specific

This commit is contained in:
Sergey Dudoladov 2020-04-08 08:25:28 +02:00
parent 84dc06bfb7
commit 7a37693c4d
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ func (c *Cluster) isSafeToRecreatePods(pods *v1.PodList) bool {
for _, pod := range pods.Items {
state, err := c.patroni.GetNodeState(&pod)
if err != nil || state != "running" {
if err != nil || state == "creating replica" {
c.logger.Warningf("cannot re-create pod %s: patroni in %s state", pod.Name, state)
return false
}