question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

patroni and etcd restart after configuration changes

See original GitHub issue

Hello Team, Currently we are using single node etcd in our patroni. Tomorrow morning we are going to made it 3 etcd node cluster. But we don’t want loose the data in postgresql.

I have few question so i can make changes easily : 1 First of all we need to create 3 etcd node, we want to use existing etcd node also then we need to create 2 more etcd node. Now we need to remove the data directory from existing etcd node or it will join the cluster and need to restart etcd service or reload will work on all 3 etcd node? 2. Now we will make change in patroni.yml file also From

etcd
     host: etcd:2379

To

etcd:
      hosts: etcd1:2379,etcd2:2379,etcd3:2379

Now we need to restart the patroni or reload will work?

Please help me so we can do it with minimum downtime or no downtime.

Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:13

github_iconTop GitHub Comments

2reactions
vitabakscommented, Nov 9, 2019

Because when slave node lag then it not sync with master and we us reinit for base backup then both node sync again.

This information is not enough to give you recommendations. If a similar problem occurs again, I suggest you open a new issue and describe the problem in detail, and attach logs.

Please suggest we will restart our patroni service if required after making changes in dcs part. We need to use below variable and setting all 3 etcd node or over 2 node which join the cluster later:

There is no need to restart the patroni service.

If you see any wrong config in my patroni.yml file

I do not see a problem in what you showed.

Now all 3 node joined the cluster.

Good! As I understand it, everything is working for you, and your main problem has been solved.

2reactions
vitabakscommented, Nov 9, 2019

ETCD_INITIAL_CLUSTER=“etcd2=192.168.56.4:2380,etcd1=http://192.168.56.3:2380

ETCD_INITIAL_CLUSTER="etcd2=http://192.168.56.4:2380,etcd1=http://192.168.56.3:2380"

http:// and you indicated ETCD_INITIAL_CLUSTER twice.

Try this configuration:

ETCD_NAME="etcd2"
ETCD_INITIAL_CLUSTER="etcd2=http://192.168.56.4:2380,etcd1=http://192.168.56.3:2380"
ETCD_LISTEN_PEER_URLS="http://192.168.56.4:2380,http://127.0.0.1:7001"
ETCD_LISTEN_CLIENT_URLS="http://127.0.0.1:2379, http://192.168.56.4:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.168.56.4:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://192.168.56.4:2379"
ETCD_INITIAL_CLUSTER_TOKEN="cluster1"
ETCD_INITIAL_CLUSTER_STATE="existing"
Read more comments on GitHub >

github_iconTop Results From Across the Web

YAML Configuration Settings — Patroni 2.1.5 documentation
The logical slots are copied from the primary to a standby with restart, and after that their position advanced every loop_wait seconds (if...
Read more >
How to set Postgresql parameters in a Patroni cluster
1. Cluster information: · 2. Firstly, we can check the current settings using the command "patronictl -c /var/lib/pgsql/patroni_etcd_conf. · 3.
Read more >
Patroni & etcd in High Availability Environments - Crunchy Data
When communication between these two pieces breaks down, it creates instability in the environment resulting in failover, cluster restart, and ...
Read more >
Patroni Documentation - Read the Docs
Also, the following Patroni configuration options can be changed only ... configured in such a way that they start failing about time when...
Read more >
Patroni etcd clusters: Introduction and How-To - CYBERTEC
But if this etcd instance were to crash, it would mean total loss of the DCS. Shortly after the etcd crash, the Patroni...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found