Skip to content

Add ability to override maxWaitForUnmountDuration for attach detach controller in controller manager #129805

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

Open
paraddise opened this issue Jan 24, 2025 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/storage Categorizes an issue or PR as relevant to SIG Storage.

Comments

@paraddise
Copy link

What would you like to be added?

When node non graceful shutdown occur kube controller manager updates taints on node and sets node.kubernetes.io/unreachable taint.
When pod's tolerationSeconds expired controller manager evict pod from node. I set tolerationSeconds: 60 for my pod and it's get evicted in time. But cannot start because I use storage with RWO and volume must be detached from failed node first. So controller manager tries to detach volume and after 6 minutes logs

I0124 12:52:02.752565       1 reconciler.go:279] "attacherDetacher.DetachVolume started: this volume is not safe to detach, but maxWaitForUnmountDuration expired, force detaching" logger="persistentvolume-attach-detach-controller" duration="6m0s" node="prod-tages-k8s-worker-2" volumeName="kubernetes.io/csi/linstor.csi.linbit.com^pvc-fb36d4b7-d16d-4e6b-a82f-70cdf5dbf7d0"

I know that NodeOutOfServiceVolumeDetach feature gate in GA since kubernetes 1.28.
With that logic I have to update node with node.kubernetes.io/out-of-service=nodeshutdown:NoExecute taint to get volume attached on new node and delete from failed node.

As I see the maxWaitForUnmountDuration is hardcoded to 6 minutes in code

Why is this needed?

I think that's common case.
My goal is to make fast migration of pod in kubernetes, I can't run this pod in multiple replicas.
But for that I need to write special controller that will taint nodes on fail. And this controller will just mark node out of service after some time it gets Unreachable.

@paraddise paraddise added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 24, 2025
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 24, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow repository.

@paraddise
Copy link
Author

/sig storage

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 24, 2025
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/storage Categorizes an issue or PR as relevant to SIG Storage.
Projects
None yet
Development

No branches or pull requests

3 participants