Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Pods Stuck In the Terminating State Due to Volume Unmount Error.
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
- Pods are getting stuck in
Terminatingstate after the deletion with the below mentioned error.
Volume Unmount Error
E0413 09:01:03.159172 8845 nestedpendingoperations.go:301] Operation for "{volumeName:kubernetes.io/projected/$pod_id-kube-api-access-kxdxg podName:$pod_id nodeName:}" failed. No retries permitted until 2022-04-13 09:01:03.659142773 -0500 CDT m=+783674.310558707 (durationBeforeRetry 500ms). Error: "UnmountVolume.TearDown failed for volume \"kube-api-access-kxdxg\" (UniqueName: \"kubernetes.io/projected/$pod_id-kube-api-access-kxdxg\") pod \"$pod_id\" (UID: \"$pod_id\") : unlinkat /var/lib/kubelet/pods/$pod_id/volumes/kubernetes.io~projected/kube-api-access-kxdxg: device or resource busy"Environment
- Platform9 Managed Kubernetes - All Versions
- Operating System: RHEL or CentOS v7.4 Onwards
Answer
- This has been a known issue with RHEL and CentOS systems and starting with RHEL7.4 kernel there is a new
sysctlparameter available to overcome this behaviour . - This parameter is
may_detach_mountsand its value is set to0by default. - It can be enabled by executing the below mentioned command on the appropriate kubernetes cluster nodes.
Command to enable the sysctl parameter
xxxxxxxxxx# echo 1 > /proc/sys/fs/may_detach_mounts# cat /proc/sys/fs/may_detach_mounts1- The kubelet will retry to unmount the projected volumes after enabling
may_detach_mountson the node. - This can take a few minutes and once done the terminating pod should get deleted from the node.
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message