diff --git a/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-overview.adoc b/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-overview.adoc index 5d4d7656d8c4..eb53669e1900 100644 --- a/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-overview.adoc +++ b/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-overview.adoc @@ -7,6 +7,7 @@ [id="persistent-storage-csi-vol-detach-non-graceful-overview_{context}"] = Overview +[role="_abstract"] A graceful node shutdown occurs when the kubelet's node shutdown manager detects the upcoming node shutdown action. Non-graceful shutdowns occur when the kubelet does not detect a node shutdown action, which can occur because of system or hardware failures. Also, the kubelet may not detect a node shutdown action when the shutdown command does not trigger the Inhibitor Locks mechanism used by the kubelet on Linux, or because of a user error, for example, if the shutdownGracePeriod and shutdownGracePeriodCriticalPods details are not configured correctly for that node. With this feature, when a non-graceful node shutdown occurs, you can manually add an `out-of-service` taint on the node to allow volumes to automatically detach from the node. \ No newline at end of file diff --git a/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-procedure.adoc b/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-procedure.adoc index fb274e2191d5..d2ca65b66e20 100644 --- a/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-procedure.adoc +++ b/modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-procedure.adoc @@ -7,23 +7,25 @@ [id="persistent-storage-csi-vol-detach-non-graceful-shutdown-procedure_{context}"] = Adding an out-of-service taint manually for automatic volume detachment +[role="_abstract"] +To allow volumes to detach automatically from a node after a non-graceful node shutdown, you can add an out-of-service taint. + .Prerequisites * Access to the cluster with cluster-admin privileges. .Procedure -To allow volumes to detach automatically from a node after a non-graceful node shutdown: - . After a node is detected as unhealthy, shut down the worker node. . Ensure that the node is shutdown by running the following command and checking the status: + [source,terminal] ---- -$ oc get node <1> +$ oc get node ---- -<1> = name of the node that shut down non-gracefully ++ +* `` = name of the node that shut down non-gracefully + [IMPORTANT] ==== @@ -34,22 +36,21 @@ If the node is not completely shut down, do not proceed with tainting the node. + [IMPORTANT] ==== -Tainting a node this way deletes all pods on that node. This also causes any pods that are backed by -statefulsets to be evicted, and replacement pods to be created on a different node. +Tainting a node this way deletes all pods on that node. This also causes any pods that are backed by statefulsets to be evicted, and replacement pods to be created on a different node. ==== + [source,terminal] ---- -$ oc adm taint node node.kubernetes.io/out-of-service=nodeshutdown:NoExecute <1> +$ oc adm taint node node.kubernetes.io/out-of-service=nodeshutdown:NoExecute ---- -<1> = name of the node that shut down non-gracefully + -After the taint is applied, the volumes detach from the shutdown node allowing their disks to be attached to a different node. +* `` = name of the node that shut down non-gracefully + -.Example +After the taint is applied, the volumes detach from the shutdown node allowing their disks to be attached to a different node. + -The resulting YAML file resembles the following: +The resulting YAML file resembles the following example file: + +.Example node YAML file with out-of-service taint applied [source, yaml] ---- spec: @@ -65,6 +66,7 @@ spec: + [source, terminal] ---- -$ oc adm taint node node.kubernetes.io/out-of-service=nodeshutdown:NoExecute- <1> +$ oc adm taint node node.kubernetes.io/out-of-service=nodeshutdown:NoExecute- ---- -<1> = name of the node that shut down non-gracefully ++ +* `` = name of the node that shut down non-gracefully diff --git a/storage/persistent-storage-csi-vol-detach-non-graceful-shutdown.adoc b/storage/persistent-storage-csi-vol-detach-non-graceful-shutdown.adoc index 602b9ed5ed35..8f15214c250c 100644 --- a/storage/persistent-storage-csi-vol-detach-non-graceful-shutdown.adoc +++ b/storage/persistent-storage-csi-vol-detach-non-graceful-shutdown.adoc @@ -1,13 +1,16 @@ :_mod-docs-content-type: ASSEMBLY [id="ephemeral-storage-csi-vol-detach-non-graceful-shutdown"] = Detach volumes after non-graceful node shutdown -include::_attributes/common-attributes.adoc[] +:toc: +:toc-title: :context: ephemeral-storage-csi-vol-detach-non-graceful-shutdown +include::_attributes/common-attributes.adoc[] -toc::[] - +[role="_abstract"] This feature allows drivers to automatically detach volumes when a node goes down non-gracefully. +toc::[] + include::modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-overview.adoc[leveloffset=+1] include::modules/persistent-storage-csi-vol-detach-non-graceful-shutdown-procedure.adoc[leveloffset=+1] \ No newline at end of file