Multi Attach Error
AKS GA 1.9 in west EU
Multi-Attach error for volume "pvc-2df1008d-7863-11e8-9ad1-0a58ac1f1349" Volume is already exclusively attached to one node and can't be attached to another
Unable to mount volumes for pod "grafana-67d785cdb5-clv9f_ops(f96e38a9-7866-11e8-9ad1-0a58ac1f1349)": timeout expired waiting for volumes to attach/mount for pod "ops"/"grafana-67d785cdb5-clv9f". list of unattached/unmounted volumes=[storage]
This is common in acs-engine too, but I didn't expect it in AKS GA
rel:
- https://github.com/Azure/acs-engine/issues/2022
- https://github.com/Azure/acs-engine/issues/2002
I'm getting the same error using 1.10.3 in canada-central.
@jalberto what's your k8s version? does it work after retry finally?
and also provide your steps about how to repro this issue on AKS, thanks.
Same issue for me. Can be easily reproduced when using an arbitrary helm-chart do deploy a PVC and the pod using it:
- Execute helm chart
- Pod startup fails because volume is not yet available
- Delete pod (manually) immediately
- New instance of pod (started by still existing deployment) shows the error. The old pod is already gone at this point in time, so the PVC should not be locked anymore.
After that you can do 3 and 4 over and over again. The only thing that seems to fix the problem immediately is to also delete the PVC.
@andyzhangx version 1.10.3 just hit this again with grafana helm chart, using default StorageClass.
Why this issue re-appear so often?
@jalberto how do you repro this issue? I tried AKS 1.10.3 with grafana helm chart, there would be Multi-Attach error when I drain one node, after a while, it could be recovered.
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned measly-mastiff-grafana-f8c797449-8cqx5 to aks-nodepool1-19606344-0
Warning FailedAttachVolume 1m attachdetach-controller Multi-Attach error for volume "pvc-ff169a18-7c75-11e8-83d3-0a58ac1f0385" Volume is already exclusively attached to one node and can't be attached to another
Normal SuccessfulMountVolume 1m kubelet, aks-nodepool1-19606344-0 MountVolume.SetUp succeeded for volume "config-volume"
Normal SuccessfulMountVolume 1m kubelet, aks-nodepool1-19606344-0 MountVolume.SetUp succeeded for volume "dashboard-volume"
Normal SuccessfulMountVolume 1m kubelet, aks-nodepool1-19606344-0 MountVolume.SetUp succeeded for volume "default-token-bsgwl"
Normal SuccessfulAttachVolume 46s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-ff169a18-7c75-11e8-83d3-0a58ac1f0385"
Normal SuccessfulMountVolume 23s kubelet, aks-nodepool1-19606344-0 MountVolume.SetUp succeeded for volume "pvc-ff169a18-7c75-11e8-83d3-0a58ac1f0385"
Normal Pulling 3s (x3 over 22s) kubelet, aks-nodepool1-19606344-0 pulling image "grafana/grafana:latest"
Normal Pulled 2s (x3 over 21s) kubelet, aks-nodepool1-19606344-0 Successfully pulled image "grafana/grafana:latest"
Normal Created 2s (x3 over 21s) kubelet, aks-nodepool1-19606344-0 Created container
Normal Started 2s (x3 over 20s) kubelet, aks-nodepool1-19606344-0 Started container
@andyzhangx how much is a "while" for you? I waited 45mins and it was not recovered.
If it helps, I just trigger the situation by upgrading the helm.
Now let's imagine it take an average of 30min, now imagine this happens because a real situation happens, I cannot wait 30 nor 15 nor 5min to a Disk to be mounted, that means production downtime.
@jalberto you could see in the above logs, "a while" means less than 1 min. How could I exactly repro your issue?
- Set up a AKS cluster with k8s v1.10.3 with 2 nodes
helm install stable/grafana- drain a node?
- AKS 10.3 with 3 nodes (DS8)
- helm install grafana (with persistent disk enabled)
- do some config changes (enough to trigger pod to be recreated)
- no profit :(
On Mon, 2 Jul 2018 at 11:05, Andy Zhang [email protected] wrote:
@jalberto https://github.com/jalberto you could see in the above logs, "a while" means less than 1 min. How could I exactly repro your issue?
- Set up a AKS cluster with k8s v1.10.3 with 2 nodes
- helm install stable/grafana
- drain a node?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/AKS/issues/477#issuecomment-401723538, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGGV2qMf-uNqVhwuSqnvMa4mOtLh_a0ks5uCeIVgaJpZM4U19Wk .
@jalberto what region is your AKS created? What's the config changes, delete pod? and make that pod reschedule on another node? Could you access azure portal to check whether that disk is still attached to original node after a few minutes? Suppose there are two nodes, node#1, node#2, in the beginning, pod and azure disk is on node#1, and then rescheduled to node#2. So you may provide me following info for both of these two nodes(node#1, node#2):
- https://resources.azure.com/subscriptions/{sub-id}/resourceGroups/{MC_resourcegroup_cluster_region}/providers/Microsoft.Compute/virtualMachines/{VM_NAME}
kubectl get no NODE-NAME -o yaml > a.log
And could you also paste kubectl describe po POD-NAME info?
hi guys, I could not repro on my k8s cluster with helm grafana or wordpress, Multi-Attach error would only exist within about 1 min and then it recovered. One thing need to confirm that you are using azure disk as ReadWriteOnce accessModes, right? One azure disk could only be attached to one pod, otherwise it's not possible by design. My repro steps are as following:
- Set up a AKS cluster with k8s v1.10.3 with 2 nodes
- helm install stable/grafana
- drain a node, and azure disk pvc and pod will be scheduled to another node
BTW, I also tried delete pod, while still no repro since same pod and pvc will be scheduled in the same node, there would be no
Multi-Attach errorwhen delete a pod.
anything I am missing?
Sorry I am out right now, I will provide as much info as I can:
- using k8s 1.10.3
- 3 nodes (DS8)
- I didn't try drain/delete but upgrade (for example change tag version)
- This is random (as you say it only happens when new pod goes to different node, but as more nodes you have, more possibilities)
I still think 1-2mins downtime is too much for this kind of process (as mount/umount is mostly instant) the longer time I saw is 45min, but I usually purge and recreate if it's not fixed after 10mins)
Using AKS 1.9.6 Location West Europe 4 Nodes
It's taking a long time for disk attaches, normally with ACS I could work around by scaling up by one, shutting down the nodes in sequence and manually clearing any disks still attached, starting them up and finally scaling the cluster down by a node.
When I look at attached disks of nodes in the portal they are "updating" for a long time.
This basically means any pods have to be kept around otherwise it takes hours for them to reattach their PV's and start the container.
We are also experiencing this issue when updating helm charts and the pod gets recreated on a different node. Downtime is always between 3 and 10 minutes which is not acceptable in our opinion.
@vogelinho10 what's your k8s version and node size? From v1.9.2 and v1.10.0, the detach or attach of one azure disk could cost around 30s, so one disk detach from one node and attach to another would cost around 1 min, so if you have 4 disks for example, total time of these 4 disks attach/detach from one node to anther would cost 4 min.
@andyzhangx AKS 1.9.6 West Europe 3 nodes (DS3 v2) The pod only has one pvc / disk attached.
@vogelinho10 could you provide kubectl describe po POD-NAME logs?
@andyzhangx yes:
Name: jenkins-6746b45c94-sgm56
Namespace: default
Node: aks-agentpool-17149307-2/10.240.0.6
Start Time: Thu, 05 Jul 2018 07:43:46 +0200
Labels: app=jenkins
chart=jenkins-0.16.3
component=jenkins-jenkins-master
heritage=Tiller
pod-template-hash=2302601750
release=jenkins
Annotations: checksum/config=b0e9cd903ca69063fc53c2ebe6fa6500aa10bf35cae93edfc04dc4e276060970
Status: Running
IP: 10.244.1.94
Controlled By: ReplicaSet/jenkins-6746b45c94
Init Containers:
copy-default-config:
Container ID: docker://d8e8429d5837bc223bbdaacc4964c7285370fa21a500d11cd0d5510dec5a582a
Image: jenkins/jenkins:lts
Image ID: docker-pullable://jenkins/jenkins@sha256:30793c79d6f59467bb8b821a8bc96cda24a61397f54658adb25825c68f8d464f
Port: <none>
Host Port: <none>
Command:
sh
/var/jenkins_config/apply_config.sh
State: Terminated
Reason: Completed
Exit Code: 0
Started: Thu, 05 Jul 2018 07:52:59 +0200
Finished: Thu, 05 Jul 2018 07:53:14 +0200
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/usr/share/jenkins/ref/secrets/ from secrets-dir (rw)
/var/jenkins_config from jenkins-config (rw)
/var/jenkins_home from jenkins-home (rw)
/var/jenkins_plugins from plugin-dir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-gs645 (ro)
Containers:
jenkins:
Container ID: docker://266c2c1de846f82ac2c5fd23d317f76dfd2b47c348c4fd2b3f6914e372673135
Image: jenkins/jenkins:lts
Image ID: docker-pullable://jenkins/jenkins@sha256:30793c79d6f59467bb8b821a8bc96cda24a61397f54658adb25825c68f8d464f
Ports: 8080/TCP, 50000/TCP
Host Ports: 0/TCP, 0/TCP
Args:
--argumentsRealm.passwd.$(ADMIN_USER)=$(ADMIN_PASSWORD)
--argumentsRealm.roles.$(ADMIN_USER)=admin
State: Running
Started: Thu, 05 Jul 2018 07:53:25 +0200
Ready: True
Restart Count: 0
Requests:
cpu: 500m
memory: 512Mi
Liveness: http-get http://:http/login delay=90s timeout=5s period=10s #success=1 #failure=12
Readiness: http-get http://:http/login delay=60s timeout=1s period=10s #success=1 #failure=3
Environment:
JAVA_OPTS: -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300
JENKINS_OPTS:
ADMIN_PASSWORD: <set to the key 'jenkins-admin-password' in secret 'jenkins'> Optional: false
ADMIN_USER: <set to the key 'jenkins-admin-user' in secret 'jenkins'> Optional: false
Mounts:
/usr/share/jenkins/ref/plugins/ from plugin-dir (rw)
/usr/share/jenkins/ref/secrets/ from secrets-dir (rw)
/var/jenkins_config from jenkins-config (ro)
/var/jenkins_home from jenkins-home (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-gs645 (ro)
Conditions:
Type Status
Initialized True
Ready True
PodScheduled True
Volumes:
jenkins-config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: jenkins
Optional: false
plugin-dir:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
secrets-dir:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
jenkins-home:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: jenkins
ReadOnly: false
default-token-gs645:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-gs645
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 31m default-scheduler Successfully assigned jenkins-6746b45c94-sgm56 to aks-agentpool-17149307-2
Warning FailedAttachVolume 31m attachdetach-controller Multi-Attach error for volume "pvc-97357b96-430b-11e8-a44d-0a58ac1f0a4f" Volume is already exclusively attached to one node and can't be attached to another
Normal SuccessfulMountVolume 31m kubelet, aks-agentpool-17149307-2 MountVolume.SetUp succeeded for volume "secrets-dir"
Normal SuccessfulMountVolume 31m kubelet, aks-agentpool-17149307-2 MountVolume.SetUp succeeded for volume "plugin-dir"
Normal SuccessfulMountVolume 31m kubelet, aks-agentpool-17149307-2 MountVolume.SetUp succeeded for volume "jenkins-config"
Normal SuccessfulMountVolume 31m kubelet, aks-agentpool-17149307-2 MountVolume.SetUp succeeded for volume "default-token-gs645"
Warning FailedMount 24m (x3 over 29m) kubelet, aks-agentpool-17149307-2 Unable to mount volumes for pod "jenkins-6746b45c94-sgm56_default(62aabcff-8016-11e8-82bc-0a58ac1f1109)": timeout expired waiting for volumes to attach/mount for pod "default"/"jenkins-6746b45c94-sgm56". list of unattached/unmounted volumes=[jenkins-home]
Normal SuccessfulMountVolume 23m kubelet, aks-agentpool-17149307-2 MountVolume.SetUp succeeded for volume "pvc-97357b96-430b-11e8-a44d-0a58ac1f0a4f"
Normal Pulling 23m kubelet, aks-agentpool-17149307-2 pulling image "jenkins/jenkins:lts"
Normal Pulled 22m kubelet, aks-agentpool-17149307-2 Successfully pulled image "jenkins/jenkins:lts"
Normal Created 21m kubelet, aks-agentpool-17149307-2 Created container
Normal Started 21m kubelet, aks-agentpool-17149307-2 Started container
Normal Pulling 21m kubelet, aks-agentpool-17149307-2 pulling image "jenkins/jenkins:lts"
Normal Pulled 21m kubelet, aks-agentpool-17149307-2 Successfully pulled image "jenkins/jenkins:lts"
Normal Created 21m kubelet, aks-agentpool-17149307-2 Created container
Normal Started 21m kubelet, aks-agentpool-17149307-2 Started container
Warning Unhealthy 20m (x2 over 20m) kubelet, aks-agentpool-17149307-2 Readiness probe failed: Get http://10.244.1.94:8080/login: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Warning Unhealthy 20m kubelet, aks-agentpool-17149307-2 Readiness probe failed: HTTP probe failed with statuscode: 503
Thanks for the info, looks like disk detach/attach in West Europe region costs a lot more time, I will try on that region, try to repro that first, thanks.
Update:
I tried on West Europe, one singe azure disk attachment would cost 2min25s, that's too much time, as comparision in region westus2, it only costs 30s. @jalberto what's your region, then? (Update: I see, it's still West Europe, that region has slow disk attachment issue, already filed a ticket)
I will file a ticket to azure VM team.
FYI @brendandburns @khenidak @slack