Make sure that nofailover presents the node even from initializing the cluster.

This commit is contained in:
Oleksii Kliukin
2015-10-26 18:57:28 +01:00
parent 685363c5a8
commit da74aee2cd
+1 -1
View File
@@ -74,7 +74,7 @@ class Ha:
self._async_executor.schedule('bootstrap from leader')
self._async_executor.run_async(self.copy_backup_from_leader, args=(self.cluster.leader, ))
return 'trying to bootstrap from leader'
elif not self.cluster.initialize: # no initialize key
elif not self.cluster.initialize and not self.patroni.nofailover: # no initialize key
if self.dcs.initialize(create_new=True): # race for initialization
try:
self.state_handler.bootstrap()