-
Notifications
You must be signed in to change notification settings - Fork 93
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
deleteOrphanPvc might remove pvc of pending container #305
Comments
Thanks for checking on this.
Also in running on spot we did see at sometimes this happen, and adding #150 fix for the reason. Can you list the exact steps to re-create the scenario. Post fixing #150 we dint see the issue arise. |
That is interesting, i was about to ask whether it could be a race condition when the pod is being terminated and then for milliseconds doesn't exist in any state (between termination and pending state). Maybe i should've mentioned that we are running the operator in version 0.0.9 which i see seems to be the latest release. Also that release was made 2 months after the fix for #150 was merged, so i do assume it is in the binary as well.
If you mean druid-wise, i can not. If you mean in general the steps are like this:
The issue does not happen for us when scaling up or down druid pods to/from a higher number (like mentioned in #150), but instead every now and then when a spot termination happens. Btw. i can see in our logs that something removed the pvc and i assure you that neither of us with access to the cluster did it at that time. See this screenshot (ignore that the entries are out of order): We do in total have 5 replicas for this statefulset, so it can not simply be that last terminated pod or something. |
@applike-ss how frequent you see this issue ? on every spot node killed did you face this ? |
We did see it once a day starting a few days before i reported the issue. |
hmmm interesting, i am not sure what extra conditional can be done to check this race. This feature was tested and is running on large spot infra running druid. |
In fact right now it happened again. I would like to suggest a "kill pod" feature if it stays in pending state longer than a configurable amount of time (default 5m?). In addition to that, maybe we could have a delayed pvc removal (1m default?) which prior removal checks again if the pvc is bound and aborts a pending deletion then? |
We are observing an issue daily where a historical node can not come up again because the pvc got removed.
deleteOrphanPvc
is enabled and the druid cluster is running on spot instances which can be taken from us at any point in time by the cloud provider.I have seen that there was an issue in the past for
deleteOrphanPvc
with a race condition (#150) and we might be running into a similar problem.My assumption right now is that this happens:
At least i could create the exact same scenario manually in our cluster when spawning a statefulset with bigger resources than we have headroom and then while the new node gets spawned removing the pvc already.
In addition to applying a similar fix as for #150 here, i would suggest to also kill the pod if it is in a pending state for longer than a configurable timespan (5 minute default maybe?).
The text was updated successfully, but these errors were encountered: