<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Application pods are stuck in terminating state in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Application-pods-are-stuck-in-terminating-state/ta-p/241280</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&lt;SPAN&gt;This problem often arises when a pod attempts to terminate but has open mounts (volumes, secrets, etc.) associated with it. Given that the OneAgent container mounts the entire host's root filesystem, it can prevent Kubernetes from unmounting these resources, leading to the pod being stuck.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="456"&gt;Currently we exclude paths matching the following regular expressions:&lt;/P&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;
&lt;DIV class="css-9n57oc"&gt;
&lt;DIV class="css-ygvpeu"&gt;
&lt;DIV role="presentation"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV role="presentation"&gt;
&lt;DIV&gt;&lt;CODE class="language-"&gt;&lt;SPAN class=""&gt;/var/lib/kubelet/plugins/kubernetes\.io/csi/pv/pvc-.*/globalmount&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;&lt;SPAN class="prismjs css-1j55rvq" data-code-lang="" data-ds--code--code-block=""&gt;&lt;CODE class="language-"&gt;/var/lib/kubelet/pods/.*/volumes/kubernetes\.io~(downward-api|empty-dir|csi|secret)
/var/lib/kubelet/pods/.*/volume-subpaths/.*
/run/netns/.*
/run/containerd/io\.containerd\.grpc\.v1\.cri/sandboxes/.*&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;
&lt;P&gt;If the default exclusions are insufficient for your setup, you can specify additional patterns for exclusion.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Set the &lt;/SPAN&gt;&lt;CODE&gt;ONEAGENT_ADDITIONAL_UNMOUNT_PATTERN&lt;/CODE&gt;&lt;SPAN&gt; environmental variable in the OneAgent container.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;If your host root filesystem is mounted as read-only, you can specify an exclusion pattern by creating a file mounted to &lt;CODE&gt;/mnt/additional_unmount_pattern&lt;/CODE&gt;. This file should contain a single line of text with the regular expression for the paths you want to exclude.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 02 Apr 2024 07:00:00 GMT</pubDate>
    <dc:creator>darynakovyrina</dc:creator>
    <dc:date>2024-04-02T07:00:00Z</dc:date>
    <item>
      <title>Application pods are stuck in terminating state</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Application-pods-are-stuck-in-terminating-state/ta-p/241280</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&lt;SPAN&gt;This problem often arises when a pod attempts to terminate but has open mounts (volumes, secrets, etc.) associated with it. Given that the OneAgent container mounts the entire host's root filesystem, it can prevent Kubernetes from unmounting these resources, leading to the pod being stuck.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="456"&gt;Currently we exclude paths matching the following regular expressions:&lt;/P&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;
&lt;DIV class="css-9n57oc"&gt;
&lt;DIV class="css-ygvpeu"&gt;
&lt;DIV role="presentation"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV role="presentation"&gt;
&lt;DIV&gt;&lt;CODE class="language-"&gt;&lt;SPAN class=""&gt;/var/lib/kubelet/plugins/kubernetes\.io/csi/pv/pvc-.*/globalmount&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;&lt;SPAN class="prismjs css-1j55rvq" data-code-lang="" data-ds--code--code-block=""&gt;&lt;CODE class="language-"&gt;/var/lib/kubelet/pods/.*/volumes/kubernetes\.io~(downward-api|empty-dir|csi|secret)
/var/lib/kubelet/pods/.*/volume-subpaths/.*
/run/netns/.*
/run/containerd/io\.containerd\.grpc\.v1\.cri/sandboxes/.*&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="code-block  css-ceksvt"&gt;
&lt;P&gt;If the default exclusions are insufficient for your setup, you can specify additional patterns for exclusion.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Set the &lt;/SPAN&gt;&lt;CODE&gt;ONEAGENT_ADDITIONAL_UNMOUNT_PATTERN&lt;/CODE&gt;&lt;SPAN&gt; environmental variable in the OneAgent container.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;If your host root filesystem is mounted as read-only, you can specify an exclusion pattern by creating a file mounted to &lt;CODE&gt;/mnt/additional_unmount_pattern&lt;/CODE&gt;. This file should contain a single line of text with the regular expression for the paths you want to exclude.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Apr 2024 07:00:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Application-pods-are-stuck-in-terminating-state/ta-p/241280</guid>
      <dc:creator>darynakovyrina</dc:creator>
      <dc:date>2024-04-02T07:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Application pods are stuck in terminating state</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Application-pods-are-stuck-in-terminating-state/tac-p/258841#M753</link>
      <description>&lt;P&gt;Hello, we have an issue where pods are unable to start within the timeout specified for the startup-probe.&lt;BR /&gt;There are a&amp;nbsp;&lt;STRONG&gt;lot&lt;/STRONG&gt; of log lines that state that files that match&amp;nbsp;&lt;SPAN&gt;.*/volume-subpaths/.* regex are being unmounted on oneagent startup.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We have a support ticket open, but we are struggling to proceed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;15:48:41 Unmounting directories&lt;BR /&gt;15:48:42 Found paths matching pattern /var/lib/kubelet/plugins/kubernetes\.io/csi/pv/pvc-.*/globalmount|/var/lib/kubelet/pods/.*/volumes/kubernetes\.io~(downward-api|empty-dir|csi|secret)|/var/lib/kubelet/pods/.*/volume-subpaths/.*|/run/netns/.*|/run/containerd/io\.containerd\.grpc\.v1\.cri/sandboxes/.*:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then we see:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;15:50:16 15:50:15 Warning: /mnt/volume_storage_mount/host_root/home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet/pods/&lt;EM&gt;uuid&lt;/EM&gt;/volume-subpaths/oneagent-share/discovery/10' failed, return code: 1, message: Error: command "umount /mnt/volume_storage_mount/host_root/home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet/pods/&lt;EM&gt;uuid&lt;/EM&gt;/volume-subpaths/oneagent-share/discovery/10" does not match any entry on the allowlist or in additional unmount pattern&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Has anyone else seen this problem?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 15:28:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Application-pods-are-stuck-in-terminating-state/tac-p/258841#M753</guid>
      <dc:creator>jonno56</dc:creator>
      <dc:date>2024-10-10T15:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Application pods are stuck in terminating state</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Application-pods-are-stuck-in-terminating-state/tac-p/272944#M872</link>
      <description>&lt;P&gt;Hello, we have pods stuck in terminating state but we don't know which volume mount is causing problems, how can we detect it? There are no relevant logs in OneAgent pods or in application pods.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 13:42:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Application-pods-are-stuck-in-terminating-state/tac-p/272944#M872</guid>
      <dc:creator>dbernardini</dc:creator>
      <dc:date>2025-03-19T13:42:57Z</dc:date>
    </item>
  </channel>
</rss>

