Troubleshooting: Pod with `volumeMode: Block` is stuck in terminating
Applicable versions
All Longhorn versions.
Symptoms
User has a pod that uses a PVC with volumeMode: Block
provisioned by Longhorn CSI driver.
After an unexpected crash of the Longhorn volume (due to network, CPU pressure, hardware problem, etc...), the user cannot delete the pod.
The pod would be stuck in terminating forever since Kubelet refuses to unmount the block volume.
This prevents the user from cleaning up the pod and spinning up a new replacement pod thus leading to a long service degradation.
For example, if the pod is part of a StatefulSet, the replacement pod cannot come up due to the old pod being stuck terminating.