跳转到主内容

排查 Statefulset Pod 卡在 ContainerCreating 或 Init 状态的问题

Views:
31
Visibility:
Public
Votes:
0
Category:
virtual-storage-console-for-vmware-vsphere
Specialty:
VIRT
Last Updated:

适用于

  • 适用于 VMware 的 ONTAP Tools (OTV) 10.1
  •  iSCSI HA 部署

问题

  • 当节点停机超过半小时后,当节点重新启动时,在维护控制台中,应用程序状态将如下所示:

  • 当我们使用以下 kubectl 命令列出 pod 时,我们可以观察到 statefulset pod 处于 ContainerCreating 或 Init 状态超过 10 分钟。
  • 要列出 pod,可以使用以下给定命令,其输出如下所示:

kubectl -n ntv-system get po -w| grep -e ContainerCreating -e Init -e Pending -e CrashLoopBackOff

ntv-mongodb-1                                      0/2     Init:0/1            0               10m17s

ntv-vault-1                                        0/1     ContainerCreating   0               10m25s

 

  • 当我们使用以下命令描述这些卡住的 pod 时,我们会注意到以下警告:

示例:  kubectl describe po ntv-vault-1 -n ntv-system

MountVolume.SetUp failed for volume "pvc-43451cff-8774-47f8-a49e-557b0dc4d4d2" : rpc error: code = Internal desc = unable to mount device; exit status 32 . 

  • kubelet 正在尝试将 PV 挂载到 pod 上, Kubelet 日志显示如下:

示例:tail -f /opt/netapp/rancher/rke2/agent/logs/kubelet.log

MountVolume.WaitForAttach entering for volume "pvc-43451cff-8774-47f8-a49e-557b0dc4d4d2"

MountVolume.WaitForAttach succeeded for volume "pvc-43451cff-8774-47f8-a49e-557b0dc4d4d2"

Error: MountVolume.SetUp failed for volume "pvc-43451cff-8774-47f8-a49e-557b0dc4d4d2" (UniqueName: "kubernetes.io/csi/csi.trident.netapp.io^pvc-43451cff-8774-47f8-a49e-557b0dc4d4d2") pod "ntv-mongodb-1" (UID: "b1ae36be-a713-46d9-9dbe-94184be7832f") : rpc error: code = Internal desc = unable to mount device; exit status 32

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.