-
Notifications
You must be signed in to change notification settings - Fork 156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather use a shell script similar to what Hawkular Metrics does.
@jpkrohling how to you want to get that shell script to the official c* docker image? |
I see a few ways, but you might find other (better?) ways as well. A few thoughts:
The first option is preferable, but if you need this feature quick, then you might want to use one of the other ones. |
Why is there this? About 1. I don't think it would happen it's basically one liner and it depends on what you want to do with the output (or even if you want to do something). We currently do not define variable I'm more for the simplest solution. |
It looks like you disconnected when I talked to @mwringe about this. It comes originally from the Kubernetes Cassandra StatefulSet example and we are not sure why it's there. Even though I'm also for the simplest solution :) Do you think just adding |
Where is this logic? Can we do the same locking? |
https://github.com/openshift/origin-metrics/blob/master/cassandra/cassandra-prestop.sh EDIT: sorry, I read the code too fast :) I thought it was a locking mechanism, but it clearly isn't |
java kill hack was introduced here, I think if we do Some other references about |
@@ -24,7 +24,7 @@ mkdir $HOME/.kube || true | |||
touch $HOME/.kube/config | |||
|
|||
export KUBECONFIG=$HOME/.kube/config | |||
sudo -E ./minikube start --vm-driver=none --use-vendored-driver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They removed --use-vendored-driver
in the last version which was released yesterday.
We can use a specific minikube version to avoid failures like this. (but I prefer to use latest for now).
About: I suspect this is here because in previous versions of Kubernetes, the prestop hook would block. So having this as part of the prestop hook would wait until Cassandra has fully exited before the pod exits. Without this, Cassandra would be killed after a timeout (default 10s?) which could be cause data corruption. But this is no longer the case and it can no longer be assumed to work this way. Even with a prestop hook, your pod will be terminated after a certain timeout (default 30s?). The way you handle it now is to specify a large I believe all you want now for a prestop hook is to just call nodetool drain. Having it in a separate script is nice and makes it easier to output information to file so that if there is a problem it can be debugged later. |
@mwringe thanks for the explanation 👍 @jpkrohling what is missing to merge? I don't think that there is a benefit in having a separate script for this. We currently don't have a place to publish the result of it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jpkrohling thanks I will open the same for OC |
Fixes part of https://github.com/uber/jaeger/issues/175.
@mwringe @jpkrohling could you please review?