Closed kviset closed 1 month ago
I think there should be None
instead of empty string.
What is interesting, it doesn't fail on Ubuntu 24.04, which also has python 3.12.
You're right, it works with None
/ # python
Python 3.12.3 (main, Aug 23 2024, 06:10:48) [GCC 13.2.1 20240309] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> host = "0.0.0.0"
>>> proto = socket.getaddrinfo(host, None, 0, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
>>> proto
[(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '0.0.0.0', ('0.0.0.0', 0))]
I tried the image postgres:15.8-alpine3.19
with python3.11
and got the same error.
I think the point is that alpine uses musl
instead of glibc
.
What happened?
When I try validate patroni configuration with python 3.12.3 i'm receive error
How can we reproduce it (as minimally and precisely as possible)?
Reproduce steps:
Create
Dockerfile
Create
patronictl.yml
Build docker
docker build . -t patroni:test
Execute docker-image
docker run --rm -ti patroni:test sh
Execute patroni validation
patroni --ignore-listen-port --validate-config /etc/patroni/patronictl.yml
What did you expect to happen?
validation was complited success
Patroni/PostgreSQL/DCS version
Patroni configuration file
patronictl show-config
Patroni log files
PostgreSQL log files
Have you tried to use GitHub issue search?
Anything else we need to know?
I think problem in https://github.com/patroni/patroni/blame/v4.0.1/patroni/validator.py#L147 because with python3.12: