Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(clickhouse-init): kill clickhouse-server on EXIT #385

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

shivaraj-bh
Copy link
Member

fixes #361

If not the clickhouse-server will keep running when there is a failure
while setting up initial databases.
@shivaraj-bh
Copy link
Member Author

@conscious-puppet can you check if this PR solves your issue?

@shivaraj-bh shivaraj-bh mentioned this pull request Nov 5, 2024
5 tasks
@conscious-puppet
Copy link
Contributor

@shivaraj-bh process-compose does not get stuck now. but it if there is only one service, then it exits after running the init script. is there any way to display the error, if the exit code was non-zero?

asciicast

@conscious-puppet
Copy link
Contributor

just a suggestion, may be we can use this process compose option to prevent process-compose shutdown automatically

      --keep-project            keep the project running even after all processes exit

ref: https://f1bonacc1.github.io/process-compose/cli/process-compose/

@shivaraj-bh
Copy link
Member Author

shivaraj-bh commented Nov 15, 2024

just a suggestion, may be we can use this process compose option to prevent process-compose shutdown automatically

      --keep-project            keep the project running even after all processes exit

ref: https://f1bonacc1.github.io/process-compose/cli/process-compose/

You can always do nix run .#<pc-project-name> -- --keep-project. Otherwise, there is also an option to run with --tui=false mode, so that the logs are dumped on the terminal’s stdout.

To configure in nix to use --keep-project will require contribution upstream in https://github.com/Platonic-Systems/process-compose-flake/blob/018783e68c89f94dbe11ce918d6206e9e4138787/nix/process-compose/cli.nix#L31-L73. I would propose to add one option extraCliArgs for such args instead of creating a specific option for it.

@shivaraj-bh shivaraj-bh merged commit 8b81987 into main Nov 15, 2024
2 checks passed
@shivaraj-bh shivaraj-bh deleted the fix-clickhouse-init branch November 15, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

process-compose gets stuck on quit if clickhouse init db fails
2 participants