Re: patroni debian bullseye package file inconsistency

From: Michael Banck <mbanck(at)debian(dot)org>
To: Kirill <yakutskkirill(at)mail(dot)ru>
Cc: pgsql-pkg-debian(at)lists(dot)postgresql(dot)org
Subject: Re: patroni debian bullseye package file inconsistency
Date: 2022-04-29 16:05:20
Message-ID: 626c0cc0.1c69fb81.3d144.536d@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-debian

Hi,

(I'm not on pgsql-pkg-debian, somebody forwarded me your mail)

On Wed, Apr 27, 2022 at 02:37:34PM +0300, Kirill wrote:
> I am using that package:
>  
> $ apt-cache policy patroni
> patroni:
>   Installed: 2.1.3-2.pgdg110+1
>   Candidate: 2.1.3-2.pgdg110+1
>   Version table:
>  *** 2.1.3-2.pgdg110+1 500
>         500 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages
>         100 /var/lib/dpkg/status
>  
> During the usage of patroni I got an error:
>  
> $ patroni --validate-config /etc/patroni-server/config.yaml

[...]

> Traceback (most recent call last):
[...]
>   File "/usr/lib/python3/dist-packages/patroni/validator.py", line 244, in iter_dict
>     validator = self.validator[key]._schema[d]
> KeyError: 'etcd3'

Apparently, running --validate-config on a config using etc3 has been
broken for quite a long time, and nobody noticed.
 
> I started to investigate and found that actual file:
>  
> $ dpkg -S  /usr/lib/python3/dist-packages/patroni/validator.py
> patroni: /usr/lib/python3/dist-packages/patroni/validator.py
>  
> is different from source file:

This is because there is a Debian patch that reverts an upstream change
that adds some RAFT tests which (as Debian does not ship RAFT yet) when
run would make the testsuite fail:
https://salsa.debian.org/postgresql/patroni/-/blob/debian/2.1.3-2/debian/patches/regression_tests_disable_raft_tests.py

However, that upstream change we reverted also added etcd3 validation,
which is what is now missing for you.

I've reworked the patch[1] so that only the RAFT-specifc changes remain,
and in my testing the above traceback is gone.

I will upload it once CI passes.

Michael

[1] https://salsa.debian.org/postgresql/patroni/-/commit/538cc5f0f9d6bd1704513f7280a0fd35cd193edf

In response to

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message apt.postgresql.org Repository Update 2022-05-02 14:50:11 libpgjava updated to version 42.3.4-1.pgdg+1
Previous Message apt.postgresql.org Repository Update 2022-04-27 21:08:00 rdkit updated to version 202203.2-1.pgdg+1