-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow a user specifiable node draining timeout #2331
Comments
/help |
@vincepri: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cc |
/milestone Next |
@williamsandrew does #2165 solve this for you? |
Oh wait, that PR is only for unreachable/unready nodes |
Correct. My use case would include nodes that are accessible but are still unable to drain within a certain period of time. |
/assign |
Just wanted to get some clarification on expected behavior. In the Machine Controller, when we are draining the nodes, the default behavior is to Evict the pods before deleting them. In this scenario of evicting the pods and then deleting them we are waiting forever for the pods to be deleted. The cluster-api/third_party/kubernetes-drain/drain.go Lines 261 to 273 in 5f0a49e
However if we just delete the pods directly by calling cluster-api/third_party/kubernetes-drain/drain.go Lines 315 to 327 in 5f0a49e
It seems that the MachineController always calls cluster-api/controllers/machine_controller.go Lines 389 to 426 in 5f0a49e
So we are going to wait forever when trying to delete pods after eviction. My question is Why are we waiting forever in one case but only 20s in the other? Feel free to reach out on slack to discuss more. 🙂 Other thoughts:
|
Thanks for the great write-up @wfernandes, let's sync up at the community meeting. +1 to using a different default where we're using |
@vincepri I added a topic under the General Questions section for the July 8th meeting. |
If I had to hazard a guess, the idea was to try to err on the side of workload safety, since pod deletion should be subject to any pod disruption budgets that are configured if we force early deletion we could be affecting configured pod disruption budgets. It does seem that That said, if we want to respect PDBs, then we need to also ensure we are calling the eviction APIs by default as well: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#how-disruption-budgets-work |
Hi all, is there anyone who is working with this issue? If not, I'd like to take care of it. My plan is:
|
Hey @namnx228 This issue is all yours. Feel free to I believe this issue was specifically for worker machines and not the control plane nodes. However, if there is a use case for the control plane then I think this can be done all at once. I don't have much context for this specifically but maybe @detiber and/or @vincepri can offer some insight. Else bring it up as a topic during this week's CAPI meeting. /unassign |
/assign |
@namnx228 thanks for working on this!
I think it makes sense to add this to the KCP spec, but the MachineDeployment already has the MachineSpec, so I don't know that you'd need to add anything to the MachineDeployment (since you'll be adding a field to MachineSpec). WDYT? |
@ncdc yes, that is a good idea to make use of the machineSpec instead of making change to the machinedeployment. Thanks for your suggestion. |
As a user/operator, I would like the option to specify a timeout for how long the machine controller will wait for a node to drain before forcibly removing the machine.
Today, if a user has specified a pod disruption budget that cannot be fulfilled, CAPI could wait forever on a machine/node that is running a pod whose budget could not be met and will never successfully drain. I would like the option to say ...
This would prevent CAPI from getting suck in an infinite reconcile loop during certain cluster conditions.
/kind feature
The text was updated successfully, but these errors were encountered: