From e4208e99dda46e581dfa163fec670c24ce686231 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Mon, 25 Nov 2024 17:41:17 +0200 Subject: [PATCH] fix: stop using openssl for container healthchecks (#4181) Dragonfly responds to ascii based requests to tls port with: `-ERR Bad TLS header, double check if you enabled TLS for your client.` Therefore, it is possible to test now both tls and non-tls ports with a plain-text PING. Fixes #4171 Also, blacklist the bloom-filter test that Dragonfly does not support yet. Signed-off-by: Roman Gershman --- tests/fakeredis/test/test_stack/test_bloomfilter.py | 1 + tools/docker/healthcheck.sh | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/fakeredis/test/test_stack/test_bloomfilter.py b/tests/fakeredis/test/test_stack/test_bloomfilter.py index 3c61fb871dd4..a17a49726dac 100644 --- a/tests/fakeredis/test/test_stack/test_bloomfilter.py +++ b/tests/fakeredis/test/test_stack/test_bloomfilter.py @@ -28,6 +28,7 @@ def test_create_cf(r: redis.Redis): assert r.topk().reserve("topk", 5, 100, 5, 0.9) +@pytest.mark.unsupported_server_types("dragonfly") def test_bf_reserve(r: redis.Redis): assert r.bf().reserve("bloom", 0.01, 1000) assert r.bf().reserve("bloom_ns", 0.01, 1000, noScale=True) diff --git a/tools/docker/healthcheck.sh b/tools/docker/healthcheck.sh index 04f193871e8a..493a641c57b1 100755 --- a/tools/docker/healthcheck.sh +++ b/tools/docker/healthcheck.sh @@ -20,13 +20,7 @@ if [ -z "$HEALTHCHECK_PORT" ]; then PORT=$(echo $DF_NET | grep -oE ':[0-9]+' | cut -c2- | tail -n 1) fi -# If we're running with TLS enabled, utilise OpenSSL for the check -if [ -f "/etc/dragonfly/tls/ca.crt" ] -then - _healthcheck="openssl s_client -connect ${HOST}:${PORT} -CAfile /etc/dragonfly/tls/ca.crt -quiet -no_ign_eof" -else - _healthcheck="nc -q1 $HOST $PORT" -fi +_healthcheck="nc -q1 $HOST $PORT" echo PING | ${_healthcheck}