Fix bug if the switchover target is the same
This commit is contained in:
parent
a329376d33
commit
d0d5ab4425
|
@ -306,6 +306,9 @@ class NodeInstance(object):
|
|||
if stdout:
|
||||
self.logger.out('Successfully switched Patroni leader\n{}'.format(stdout), state='o')
|
||||
break
|
||||
elif stderr == "Error: Switchover target and source are the same.":
|
||||
self.logger.out('Failed to switch Patroni leader to ourselves; this is fine\n{}'.format(stderr), state='w')
|
||||
break
|
||||
else:
|
||||
self.logger.out('Failed to switch Patroni leader; retrying\n{}'.format(stderr), state='e')
|
||||
time.sleep(2)
|
||||
|
|
Loading…
Reference in New Issue