ihanick / anydbver

LXD+Ansible setup to install Percona/Oracle MySQL/MongoDB/Postgresql database products with exact version specified.
MIT License
50 stars 12 forks source link

Patroni fails on node2. #21

Closed guriandoro closed 9 months ago

guriandoro commented 9 months ago

In a 3-node PG/Patroni environment, the same node name is being used in nodes 1 and 2, so this is creating conflicts. I noticed the yaml file is named the same in both nodes, too.

Node1:

[root@node1 ~]# head /etc/patroni/cluster1-1.yml
scope: stampede
#namespace: /service/
name: cluster1-1
restapi:
 listen: 0.0.0.0:8008
 connect_address: 192.168.48.3:8008
etcd:
 host: 192.168.48.3:2379
bootstrap:
 # this section will be written into Etcd:/<namespace>/<scope>/config after initializing new cluster

Node2

[root@node2 ~]# head /etc/patroni/cluster1-1.yml
scope: stampede
#namespace: /service/
name: cluster1-1
restapi:
 listen: 0.0.0.0:8008
 connect_address: 192.168.48.4:8008
etcd:
 host: 192.168.48.4:2379
bootstrap:
 # this section will be written into Etcd:/<namespace>/<scope>/config after initializing new cluster

Everything else but the name is ok (like IP addresses).

ihanick commented 9 months ago

I've added random part to the name. Proper fix to allow > 3 etcd servers setup requires bigger effort.