Closed conscious-puppet closed 1 week ago
Here’s the culprit: https://github.com/juspay/services-flake/blob/deaa2b81d07d2e7ec2ee74e91e17020d31bf3cb7/nix/services/clickhouse/default.nix#L120-L125
During init
the server starts and because the schema files have errors, and exits with non-zero exit-code, the script stops before killing the server.
The easiest fix is to run the shell script without breaking on errors in any intermediate command.
But, I would like to see if we can just avoid starting the clickhouse-server
in the init script, by just waiting for the server process to start and then init the schemas.
pinging @roman-bodavskiy to see if you have any opinion on this as you worked on this in https://github.com/juspay/services-flake/pull/91
process-compose gets stuck on quit if the the clickhouse init db service fails. we need to manually kill the clickhouse process.
the issue can be reproduced by using a malformed initial db dump with the clickhouse service.