pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
To: Deepak tyagi <deepaktyagi454@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Patroni configuration issue
Date: Wed, 7 Jul 2021 14:25:09 +0530
Message-ID: <CAM+6J94kdFHbFDbfXepaG7bTY6CnSwyFZMpWwuzSfLW9WD7L2Q@mail.gmail.com> (raw)
In-Reply-To: <CAM+6J9706uiLAtCXdk6Pd_L49fi7rjxvwNxb=rq5nT6Po9EOxw@mail.gmail.com>
References: <CAFC+CByoZmvgNZbi9hZiZ_g7Vwbc5mHsjxN3cydj0sLW5RqOgA@mail.gmail.com>
	<CAM+6J9706uiLAtCXdk6Pd_L49fi7rjxvwNxb=rq5nT6Po9EOxw@mail.gmail.com>

On Tue, 6 Jul 2021 at 03:37, Vijaykumar Jain <
vijaykumarjain.github@gmail.com> wrote:

> I may be wrong in my simulation (my first time), but in that case you will
> have to describe how did you setup your cluster, did you use any reference
> etc?
> maybe that might help me understand this more.
>
>
just following up on this, I was new to etcd and installed v3.5.x and was
not sure how to list all keys etc,
turns out, I had to set ETCDCTL_API=2, and use the old version commands to
list and del key.

export ETCDCTL_API=2 # ls does not work on v3
alias ee='etcdctl --endpoints=http://127.0.0.1:2379 '

# i used default namespace and cluster name, so
postgres@db:~/patroni_demo$ ee ls  --recursive /
/service
/service/batman
/service/batman/members
/service/batman/members/postgresql0
/service/batman/members/postgresql1
/service/batman/initialize   --- this is the key we need to delete to
reinit the db
/service/batman/config
/service/batman/leader
/service/batman/optime
/service/batman/optime/leader

postgres@db:~/patroni_demo$ ee get /service/batman/initialize
6981912157875070537

# solve i am not leader, server not starting up
ee rm /service/batman/initialize
PrevNode.Value: 6981912157875070537

and then run patroni <config> again as a fresh setup, and you get your
leaders and replica just fine.

view thread (4+ messages)

Message-ID: <CAM+6J94kdFHbFDbfXepaG7bTY6CnSwyFZMpWwuzSfLW9WD7L2Q@mail.gmail.com>
Permalink:  ../CAM+6J94kdFHbFDbfXepaG7bTY6CnSwyFZMpWwuzSfLW9WD7L2Q@mail.gmail.com/
Also on:    postgresql.org/message-id/CAM+6J94kdFHbFDbfXepaG7bTY6CnSwyFZMpWwuzSfLW9WD7L2Q@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: vijaykumarjain.github@gmail.com, deepaktyagi454@gmail.com
  Subject: Re: Patroni configuration issue
  In-Reply-To: <CAM+6J94kdFHbFDbfXepaG7bTY6CnSwyFZMpWwuzSfLW9WD7L2Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox