patroni icon indicating copy to clipboard operation
patroni copied to clipboard

Is there a plan to support etcd API v3

Open lkgGitHub opened this issue 2 years ago • 1 comments

Describe the bug error log

ERROR: Failed to get list of machines from http://xxx:2379/v2: EtcdException('Bad response : 404 page not found\n')
INFO: waiting on etcd

To Reproduce patroni /etc/patroni.yml

Expected behavior Expect to support etcd v3 api normally

Environment

  • Patroni version: 2.1.4
  • PostgreSQL version: v14.5
  • DCS (and its version): etcd v3.5.5

Have you checked Patroni logs?

ERROR: Failed to get list of machines from http://xxx:2379/v2: EtcdException('Bad response : 404 page not found\n')
INFO: waiting on etcd

Have you tried to use GitHub issue search? Yes,

lkgGitHub avatar Sep 21 '22 09:09 lkgGitHub

Please define "normally". The v3 API is supported via gRPC gateway. Nothing else is planned.

https://patroni.readthedocs.io/en/latest/SETTINGS.html#etcdv3

CyberDem0n avatar Sep 21 '22 09:09 CyberDem0n

While we had limited time to investigate this so we can't claim for sure that there isn't some obscure way to do it, we found that our preferred way of using mTLS was causing a problems with the gRPC gateway, because the client certificate wasn't getting forwarded.

Others seem to have come to similar conclusions: https://github.com/grpc-ecosystem/grpc-gateway/issues/350

The workaround we found was to enable password authentication in a separate etcd cluster dedicated to patroni. To be fair, it was our intent anyways to have a dedicated etcd cluster for patroni even if it is probably a little wasteful, because we didn't want anything else to interfere with the stability of our postgres clusters.

Anyways, just forwarding that bit of information in case it saves anyone some time.

Magnitus- avatar Oct 18 '22 11:10 Magnitus-