From: chaitanyabodlapati (@chaitanyabodlapati) <noreply+chaitanyabodlapati@github.com>
To: patroni/patroni <noreply+patroni-patroni@github.com>
Subject: Re: [patroni/patroni] PR #3608: Add opt-in TLS verification flags for etcd/etcd3 DCS backends
Date: Thu, 06 Aug 2026 22:17:43 +0000
Message-ID: <gh-patroni-patroni-3608-c5209506813@github.com> (raw)
In-Reply-To: <gh-patroni-patroni-3608@github.com>
References: <gh-patroni-patroni-3608@github.com>
Thanks for the review, @CyberDem0n. I've addressed all the comments:
1. Helper moved into etcd.py as a private function (no separate file); tests moved into tests/test_etcd.py.
2. verify=false no longer builds an SSLContext — it just sets cert_reqs='CERT_NONE' and assert_hostname=False on the pool and lets urllib3 build its own context.
3. Early return for non-https protocol, so etcd on a private network without TLS is unaffected and logs no misleading warning.
4. import ssl moved inside the function, after the non-https and default-flag guards, so a Python built without ssl still works for plain HTTP etcd.
5. hostname_checks_common_name only applied when hostname checking is on, and no longer raises RuntimeError — since it already defaults to True, setting it is now a best-effort try/except.
Would you mind taking another look when you get a chance? Thanks!