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

Graceful Vertica node stop in case of pod termination #935

Open
nyikesda opened this issue Sep 26, 2024 · 3 comments
Open

Graceful Vertica node stop in case of pod termination #935

nyikesda opened this issue Sep 26, 2024 · 3 comments

Comments

@nyikesda
Copy link
Contributor

PreStop hook in the container spec is a lifecycle hook that allows you to execute a command in a container right before it is terminated. This can be useful for performing cleanup or graceful shutdown tasks before a pod is taken down.

What do you think, would not be a good setting in the container in preStop hook to stop the vertica node gracefully?

Actually, we cannot set such kind of thing, because it cannot be configured in the operator configuration.

Kubernetes start pod termination in several cases (for example: in case of pod eviction because of resources, or kubernetes node drain) and in these cases the operator does not notice to stop the kubernetes on that pod gracefully.

@roypaulin
Copy link
Collaborator

roypaulin commented Sep 26, 2024

Hi @nyikesda. I get the idea. preStop hooks are indeed very useful in many cases. They are also to be used carefully as you would need to set a ``terminationGracePeriodSeconds` long enough to allow the preStop hook to complete but is not excessively long
I will look into what kind of actions can be executed through preStop hook and their benefits on Vertica.

Do you mind telling me an example of specific action you would like to set in the preStop hook?

@nyikesda
Copy link
Contributor Author

nyikesda commented Sep 26, 2024

I know that admintool usage is deleted from operator 2.0.0, but with admintool I would run a script which would call: /opt/vertica/bin/adminTools -t stop_node --hosts v_vertica_db_node0001 in case of node1 to stop the node gracefully when a pod is terminated.

I hope that this idea would be possible in case of vcluster-ops as well with curl commands for example.

@roypaulin
Copy link
Collaborator

We are going to investigate adding a preStop hook to the vertica pods. I will keep you posted when I have updates.

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

No branches or pull requests

2 participants