Hello Team,
Currently we are using 2 node cluster in patroni. But we want to upgrade version of our postgresql.
So we are planning that we will add 2 more new node with latest version of postgresql in existing running patroni cluster and replicate the data using patroni.
Once new node have all database data we will remove older nodes from patroni cluster.
Can you please give me some idea how we can add new node and remove old node from existing patroni cluster?
We are using single etcd cluster for multiple patroni cluster.
Thanks.
Hello Team,
When i am trying to add 3rd node under same cluster on patroni i am getting below error:
system ID mismatch, node hp-db belongs to a different cluster
Below is the some part of patroni.yml file:
scope: tcd
namespace: /db/
name: hp-db
restapi:
listen: 192.168.56.105:8008
connect_address: 192.168.56.105:8008
etcd:
hosts: 192.168.56.105:2379
scope and namespace is common on all 3 nodes. 2 node are working fine, we can see below
root@slave1:~# patronictl -c /etc/patroni.yml list
+---------+---------+----------------+--------+---------+----+-----------+
| Cluster | Member | Host | Role | State | TL | Lag in MB |
+---------+---------+----------------+--------+---------+----+-----------+
| tcd | master1 | 192.168.56.115 | | running | 53 | 0 |
| tcd | slave1 | 192.168.56.116 | Leader | running | 53 | 0 |
+---------+---------+----------------+--------+---------+----+-----------+
Can you please help me on below points:
Please help me.
Thanks.
system ID mismatch, node hp-db belongs to a different cluster
Please use the search
I am really sorry in advance, but if you are asking such a simple questions without even doing a bit of reaserch amoung existing issues or just by googling it, that makes me wonder how did you even managed to deploy an existing cluster?
@CyberDem0n, Thank you for your response.
Apologies for sili question.
This node was part of another cluster and after deleting the data from data directory this node able to join the cluster.
How we can delete a node from running patroni cluster?
patronictl -c /etc/patroni.yml remove cluster_name
It will delete the cluster. But we want to delete only one node from patroni cluster.
Thanks.
But we want to delete only one node from patroni cluster.
sudo systemctl stop patroni.service
Most helpful comment
Please use the search
I am really sorry in advance, but if you are asking such a simple questions without even doing a bit of reaserch amoung existing issues or just by googling it, that makes me wonder how did you even managed to deploy an existing cluster?