-
Notifications
You must be signed in to change notification settings - Fork 795
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
Optimize LCH Behavior During Termination Events #1926
Comments
@torredil I guess this is reason for my problem at #1665 (comment) |
Is this also the reason for #1955 ? |
@primeroz No, the root cause for #1955 was identified as a regression introduced by a breaking change in Karpenter related to taints: kubernetes-sigs/karpenter#508 - that issue was fixed by #1969 and released in driver v1.29.0 (the corresponding add-on release is currently in progress and is expected to be available by March 29) This specific issue was created to address a scenario / race condition where executing the prestop lifecycle hook is undesirable based on EC2 API behavior - today, The optimal solution here would be to make Karpenter aware of volume teardown before invoking |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Issue Description
Currently, the CSI node pod utilizes OS graceful shutdown time during termination events by waiting for volumes on a node to be detached because Kubelet's node shutdown manager does not consider volume cleanup as a signal and tends to prematurely terminate the driver pod, which can result in delayed attachments.
Ideally,
DetachVolume
calls should complete beforeTerminateInstances
is invoked - however, in scenarios whereTerminateInstances
is called by autoscalers such as Karpenter, it is undesirable for the lifecycle hook to wait for detachments to succeed in the backend becauseDetachVolume
requests made afterTerminateInstances
will wait for theTerminateInstances
workflow to complete.Additional Context
According to the external attacher docs, checking for the presence of
DeletionTimestamp
in VA objects can be used to ensure that volumes have been successfully unmounted from k8s perspective (which is more reliable than scanning for mounts on the host).Also, kubelet sets a
NotReady
condition on the node with the reason set to "node is shutting down", which can be used to determine node status to stop waiting on detaches in specifically the scenario described above.The text was updated successfully, but these errors were encountered: