From ea53d79d48f7f5229ddc16fe2b09dc93dcebedfc Mon Sep 17 00:00:00 2001 From: Gao Binlong Date: Sun, 29 Sep 2024 10:29:00 +0800 Subject: [PATCH] Optimize health check method Signed-off-by: Gao Binlong --- qa/remote-clusters/Dockerfile | 6 ------ qa/remote-clusters/docker-compose.yml | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 qa/remote-clusters/Dockerfile diff --git a/qa/remote-clusters/Dockerfile b/qa/remote-clusters/Dockerfile deleted file mode 100644 index 717a43f9abc87..0000000000000 --- a/qa/remote-clusters/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM haproxy:2.1.2 - -# Install netcat -RUN apt-get update && \ - apt-get install -y netcat-traditional && \ - rm -rf /var/lib/apt/lists/* diff --git a/qa/remote-clusters/docker-compose.yml b/qa/remote-clusters/docker-compose.yml index 87d18ea8ff0f5..2112da17efe6e 100644 --- a/qa/remote-clusters/docker-compose.yml +++ b/qa/remote-clusters/docker-compose.yml @@ -67,9 +67,6 @@ services: timeout: 2s retries: 5 haproxy: - build: - context: . - dockerfile: Dockerfile image: haproxy:2.1.2 ports: - "9600" @@ -78,7 +75,7 @@ services: depends_on: - opensearch-2 healthcheck: - test: ["CMD", "nc", "-z", "localhost", "9600"] + test: ["CMD", "timeout", "1", "bash", "-c", "cat < /dev/null > /dev/tcp/localhost/9600"] interval: 2s timeout: 1s retries: 5