Unable to mount persistent volume in sgx-backed aks(on Standard_DC4s/DC2s instances)
Describe the bug Getting the following error when using PVC in a pod
$kubectl describe pod ccf-0
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedMount 11m (x29 over 74m) kubelet, k8s-agentpool2-27527272-vmss000002 Unable to mount volumes for pod "ccf-0_default(ba84d759-519a-11ea-8e01-000d3a8fef66)": timeout expired waiting for volumes to attach or mount for pod "default"/"ccf-0". list of unmounted volumes=[ledger]. list of unattached volumes=[ledger dev-sgx input-volume cert-volume default-token-m6psq]
Warning FailedMount 5m30s (x42 over 76m) kubelet, k8s-agentpool2-27527272-vmss000002 MountVolume.WaitForAttach failed for volume "pvc-e1c50513-5198-11ea-8e01-000d3a8fef66" : azureDisk - WaitForAttach failed within timeout node (k8s-agentpool2-27527272-vmss000002) diskId:(ccf-aks-dynamic-pvc-e1c50513-5198-11ea-8e01-000d3a8fef66) lun:(0)
Node shows 0 attachable-volumes-azure-disk
$kubectl describe no k8s-agentpool2-27527272-vmss000002
Resource Requests Limits
-------- -------- ------
cpu 850m (42%) 1050m (52%)
memory 1168Mi (16%) 3160Mi (43%)
ephemeral-storage 0 (0%) 0 (0%)
attachable-volumes-azure-disk 0 0
Steps To Reproduce Use PVC with sgx-backed AKS resource created using aks-engine
Expected behavior
PVC should be mounted
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
Describe the bug Getting the following error when using PVC in a pod
$kubectl describe pod ccf-0 Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedMount 11m (x29 over 74m) kubelet, k8s-agentpool2-27527272-vmss000002 Unable to mount volumes for pod "ccf-0_default(ba84d759-519a-11ea-8e01-000d3a8fef66)": timeout expired waiting for volumes to attach or mount for pod "default"/"ccf-0". list of unmounted volumes=[ledger]. list of unattached volumes=[ledger dev-sgx input-volume cert-volume default-token-m6psq] Warning FailedMount 5m30s (x42 over 76m) kubelet, k8s-agentpool2-27527272-vmss000002 MountVolume.WaitForAttach failed for volume "pvc-e1c50513-5198-11ea-8e01-000d3a8fef66" : azureDisk - WaitForAttach failed within timeout node (k8s-agentpool2-27527272-vmss000002) diskId:(ccf-aks-dynamic-pvc-e1c50513-5198-11ea-8e01-000d3a8fef66) lun:(0)Node shows 0 attachable-volumes-azure-disk
$kubectl describe no k8s-agentpool2-27527272-vmss000002 Resource Requests Limits -------- -------- ------ cpu 850m (42%) 1050m (52%) memory 1168Mi (16%) 3160Mi (43%) ephemeral-storage 0 (0%) 0 (0%) attachable-volumes-azure-disk 0 0Steps To Reproduce Use PVC with sgx-backed AKS resource created using aks-engine
Expected behavior
PVC should be mounted
@iqsarv what's your k8s version? is it recovered now?
@andyzhangx apologies for late reply
it has not recovered. Below is the version
sarv@sarv-ccf:~/AKS-for-CCF$ kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-12T13:43:46Z", GoVersion:"go1.13.7", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.11", GitCommit:"25074a190ef2a07d8b0ed38734f2cb373edfb868", GitTreeState:"clean", BuildDate:"2019-09-18T14:34:46Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}
sarv@sarv-ccf:~/AKS-for-CCF$
what's your vm size? could you ssh to the node and provide "/dev/disk/azure/" struct? it could be similar to this issue: https://github.com/kubernetes-sigs/azuredisk-csi-driver/issues/212
I am using DC2s
sarv@sarv-ccf:~/AKS-for-CCF$ kubectl get no -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
k8s-agentpool2-27527272-vmss000000 Ready agent 43d v1.13.11 10.240.0.34 <none> Ubuntu 18.04.3 LTS 5.0.0-1023-azure docker://3.0.8
k8s-agentpool2-27527272-vmss000002 Ready agent 9d v1.13.11 10.240.0.65 <none> Ubuntu 18.04.3 LTS 5.0.0-1023-azure docker://3.0.8
k8s-master-27527272-0 Ready master 43d v1.13.11 10.255.255.5 <none> Ubuntu 16.04.6 LTS 4.15.0-1061-azure docker://3.0.8
sarv@sarv-ccf:~/AKS-for-CCF
Taking a look at the issue you attached
this fix(https://github.com/kubernetes/kubernetes/pull/86612) is only in v1.18 or on latest csi driver, do you want to cherry-pick to old version?
sure, I will upgrade to this version and recheck
the latest 1.18.0-beta.1 on aks-engine should have the fix:
https://github.com/Azure/aks-engine/blob/904ef95a173b82f0c834f232ad973f4786776ed4/pkg/api/common/versions.go#L182
/assign
I was wrong, this issue is already fixed in 1.15.8, 1.16.5, 1.17.1, 1.18.0, let me know if you have any questions.