Comments (6)
This is a known issue between two threads running in the kubelet and explained in detail here kubernetes/kubernetes#115148 (comment). In summary node-shutdown-manager terminates all Pods (including the CSI Driver node plugin) which means that there's no component in the node to safely perform a unmount on workload Pods, therefore, external-attacher waits for 6m before forcefully detaching the volume. While a proper fix would be to add synchronization between the threads so that node-shutdown-manager waits for the CSI Node plugin to finish doing the unmount we found a simple workaround, we added a preStop hook on the EBS CSI Node plugin so that it's not terminated immediately when node-shutdown-manager receives the termination signal:
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "sleep 30; exit 0"]
That way it has enough time to do unmount. Note that it's not guaranteed that termination of this Pod will happen in 30s because I believe node-shutdown-manager reacts to the Spot instance interruption action instead of the two-minute Spot Instance interruption notice.
from external-attacher.
Thanks @mauriciopoppe. Makes sense. Just to confirm is that something I need to put in as I can't see it in the current ebs csi node configuration.
from external-attacher.
Yes, this would be new config in the CSI plugin DaemonSet on the EBS CSI Driver container, for more info please check https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
from external-attacher.
@mauriciopoppe Right. I might just hold off as I don't want to duplicate off a different configuration and maintain it. I can't see anything in the available chart that would allow me to inject as it stands. Unless you can point me to where I'm missing it.
Sounds like there might be some disconnect / disagreement with this project and requirements as well.
from external-attacher.
I think you could raise an issue there to see if they can add the lifecycle hook through an additional config property in their helm chart. Feel free to add a pointer in the issue to this issue or kubernetes/kubernetes#115148 explaining why they'd need to support it in their helm chart.
I'm closing this issue because we know it's a known problem tracked in kubernetes/kubernetes#115148
/close
from external-attacher.
@mauriciopoppe: Closing this issue.
In response to this:
I think you could raise an issue there to see if they can add the lifecycle hook through an additional config property in their helm chart. Feel free to add a pointer in the issue to this issue or kubernetes/kubernetes#115148 explaining why they'd need to support it in their helm chart.
I'm closing this issue because we know it's a known problem tracked in kubernetes/kubernetes#115148
/close
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.
from external-attacher.
Related Issues (20)
- csi-attacher:v3.3.0 image unavailable HOT 3
- csi-attacher image is having vulneraility HOT 5
- Attachment reconciler is incorrectly using nodeid annotation HOT 5
- Retry on attach error does not respect exponential backoff
- csi-attacher:v3.4.0 image unavailable HOT 1
- change default fstype from "ext4" to empty string HOT 4
- Single timeout for attachment/detachment and reconcile resync operations not always appropriate HOT 16
- Emit events on detach errors HOT 18
- Version 3.5.0 vulnerability with CVE-2022-1996 HOT 11
- Question about reconciling (reconcileVA) based on RPC_LIST_VOLUMES_PUBLISHED_NODES HOT 6
- Broken link of `contributor cheat sheet` needs to fix
- csi attacher report panic in log HOT 5
- Uncertain handling for attach HOT 14
- VolumeAttachment has attached status true but actual state false HOT 12
- Readme has incorrect compatibility information for kubernetes version HOT 5
- 7 High Security vulnerability on latest CSI-attacher:v4.3.0 sidecar image HOT 7
- `fault.CnsNotRegisteredFault.summary` while consuming a volume by a pod HOT 2
- Attacher doesn't allow to set volumes limit in the ListVolume request
- ListVolumes : Panic detected on v4.4.1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from external-attacher.