vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.69k stars 411 forks source link

Patroni pre-checks: check etcd cluster accessible #476

Open lavr opened 1 year ago

lavr commented 1 year ago

I suggest checking the network availability of the etcd cluster before adding nodes to the Patroni cluster. If etcd is unavailable for some reason, don't even attempt to add the node.

I created the role patroni/pre-checks for this purpose and added it to the playbooks deploy_pgcluster.yml and add_pgnode.yml.

I considered adding this checks to other playbooks but decided it might hinder the administrator from updating the cluster in some situations, which could be unsafe.

vitabaks commented 1 year ago

@lavr Thanks!

Maybe it 's worth move this task to an already existing pre-checks role?