Statefulset PodがContainerCreating状態またはInit状態に陥るトラブルシューティング
環境
- ONTAP Tools for VMware(OTV)10.1
- iSCSI HA 展開
問題
- ノードが30分以上ダウンし、その後復旧すると、メンテナンスコンソールでアプリケーションステータスは次のようになります:
- 次のkubectlコマンドを使用してポッドを一覧表示すると、statefulsetポッドがContainerCreatingまたはInit状態で10分以上スタックしていることがわかります。
- ポッドを一覧表示するには、以下のコマンドを使用でき、その出力は次のようになります:
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
- 以下のコマンドを使用してこれらのスタックしたポッドのいずれかを説明すると、以下の警告が表示されます:
例: 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をマウントしようとしており、 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