Skip to content

Commit 1acdc27

Browse files
authored
Merge pull request #45119 from rohitssingh/disable_force_detach-dev-1.30
Add documentation for disable-force-detach-on-timeout
2 parents 78956f8 + 0abea85 commit 1acdc27

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

content/en/docs/concepts/architecture/nodes.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,35 @@ During a non-graceful shutdown, Pods are terminated in the two phases:
513513
recovered since the user was the one who originally added the taint.
514514
{{< /note >}}
515515

516+
### Forced storage detach on timeout {#storage-force-detach-on-timeout}
517+
518+
In any situation where a pod deletion has not succeeded for 6 minutes, kubernetes will
519+
force detach volumes being unmounted if the node is unhealthy at that instant. Any
520+
workload still running on the node that uses a force-detached volume will cause a
521+
violation of the
522+
[CSI specification](https://github.com/container-storage-interface/spec/blob/master/spec.md#controllerunpublishvolume),
523+
which states that `ControllerUnpublishVolume` "**must** be called after all
524+
`NodeUnstageVolume` and `NodeUnpublishVolume` on the volume are called and succeed".
525+
In such circumstances, volumes on the node in question might encounter data corruption.
526+
527+
The forced storage detach behaviour is optional; users might opt to use the "Non-graceful
528+
node shutdown" feature instead.
529+
530+
Force storage detach on timeout can be disabled by setting the `disable-force-detach-on-timeout`
531+
config field in `kube-controller-manager`. Disabling the force detach on timeout feature means
532+
that a volume that is hosted on a node that is unhealthy for more than 6 minutes will not have
533+
its associated
534+
[VolumeAttachment](/docs/reference/kubernetes-api/config-and-storage-resources/volume-attachment-v1/)
535+
deleted.
536+
537+
After this setting has been applied, unhealthy pods still attached to a volumes must be recovered
538+
via the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure mentioned above.
539+
540+
{{< note >}}
541+
- Caution must be taken while using the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure.
542+
- Deviation from the steps documented above can result in data corruption.
543+
{{< /note >}}
544+
516545
## Swap memory management {#swap-memory}
517546

518547
{{< feature-state feature_gate_name="NodeSwap" >}}

static/_redirects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
/docs/concepts/jobs/run-to-completion-finite-workloads/ /docs/concepts/workloads/controllers/job/ 301
8080
/id/docs/concepts/jobs/run-to-completion-finite-workloads/ /id/docs/concepts/workloads/controllers/job/ 301
8181
/docs/concepts/nodes/node/ /docs/concepts/architecture/nodes/ 301
82+
/docs/storage-force-detach-on-timeout/ /docs/concepts/architecture/nodes/#storage-force-detach-on-timeout 302
8283
/docs/concepts/services-networking/connect-applications-service/ /docs/tutorials/services/connect-applications-service/ 301
8384
/docs/concepts/object-metadata/annotations/ /docs/concepts/overview/working-with-objects/annotations/ 301
8485
/docs/concepts/overview/ /docs/concepts/overview/what-is-kubernetes/ 301

0 commit comments

Comments
 (0)