From c64f1de72049eb247778f63b097697fd1a177a0a Mon Sep 17 00:00:00 2001 From: shivaraj-bh Date: Thu, 22 Feb 2024 02:37:59 +0530 Subject: [PATCH 1/2] maybe it is the readiness_probe? --- nix/clickhouse/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/clickhouse/default.nix b/nix/clickhouse/default.nix index fc8385e5..5a47f027 100644 --- a/nix/clickhouse/default.nix +++ b/nix/clickhouse/default.nix @@ -152,7 +152,10 @@ in command = "${lib.getExe startScript}"; readiness_probe = { - exec.command = ''${config.package}/bin/clickhouse-client --query "SELECT 1" --port ${builtins.toString config.port}''; + http_get = { + host = "localhost"; + port = if (lib.hasAttr "http_port" config.extraConfig) then config.extraConfig.http_port else 8123; + }; initial_delay_seconds = 2; period_seconds = 10; timeout_seconds = 4; From 6849689fa4869e855adbf41b11e33fe407e4778f Mon Sep 17 00:00:00 2001 From: shivaraj-bh Date: Tue, 27 Feb 2024 18:07:04 +0530 Subject: [PATCH 2/2] add fixme for clickhouse-client readiness_probe --- nix/clickhouse/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nix/clickhouse/default.nix b/nix/clickhouse/default.nix index 58109bff..cc5f941a 100644 --- a/nix/clickhouse/default.nix +++ b/nix/clickhouse/default.nix @@ -157,6 +157,9 @@ in command = "${lib.getExe startScript}"; readiness_probe = { + # FIXME: revert back to clickhouse-client readiness_probe once CI is moved out of github public runners + # See: https://github.com/juspay/services-flake/issues/100 + # exec.command = ''${config.package}/bin/clickhouse-client --query "SELECT 1" --port ${builtins.toString config.port}''; http_get = { host = "localhost"; port = if (lib.hasAttr "http_port" config.extraConfig) then config.extraConfig.http_port else 8123;