Giter VIP home page Giter VIP logo

Comments (6)

mauriciopoppe avatar mauriciopoppe commented on June 22, 2024

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.

dcarrion87 avatar dcarrion87 commented on June 22, 2024

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.

mauriciopoppe avatar mauriciopoppe commented on June 22, 2024

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.

dcarrion87 avatar dcarrion87 commented on June 22, 2024

@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.

https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/charts/aws-ebs-csi-driver/templates/node.yaml

Sounds like there might be some disconnect / disagreement with this project and requirements as well.

from external-attacher.

mauriciopoppe avatar mauriciopoppe commented on June 22, 2024

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.

k8s-ci-robot avatar k8s-ci-robot commented on June 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.