-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volumes attaching fails #292
Comments
@tsmetana the Is this volume attachment happening shortly after the instance is started? And is this issue reproducible? |
I am experiencing the same issue. Kube cluster 1.14 |
error logs from ebs-plugin:
|
AWS console shows that the volume that's attempting to be attached is |
@leakingtapan -- just as described by @anusha-ragunathan (thanks for adding the info) -- this happens every time (i.e., the current master HEAD is unusable for me), the age of the cluster doesn't affect the problem. |
I tried the dynamic provisioning example on 1.14 cluster and it works for me. The cluster is provisioned using
k8s version:
But can't reproduce the issue. How did you guys create the cluster? And what is the instance type being used? @anusha-ragunathan since you can consistently reproduce the issue could you print out the instance object during |
I have a 3 node cluster provisioned using Docker Enterprise UCP 3.2.0. |
Still can't reproduce using |
I think I just used |
I think the necessary condition for reproducing the bug is to have the system installed on |
@leakingtapan : I reproduced the issue with added debug log to dump the |
There's definitely some enumeration issue going on.
Linux partition details:
BlockDeviceMappings on the EC2 instance:
|
Instance says "hey! /dev/xvda is available". So plugin starts to attach volume under that device name. However, Linux partition has |
According to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html, on HVM instances, sda1 and xvda are reserved for root partition. Also, the available block device range for xvd follow "/dev/xvd[b-c][a-z]" pattern. However commit 1ace946 violates the reserved device names and the naming logic. This causes volume attachment issues. For example, for instances where /dev/xvda is root partition, the driver tries to create a new device with the same reserved name. This change fixes the issue. Testing: Deployed Kube 1.14 cluster. Update manifest.yaml with canary images for sidecards and new names for API resources. Tested new plugin and created sc, pvc (pv) and pod. Volume attaches to node successfully. New device attached is "/dev/xvdba" as expected. Pod mounts volume and runs fine. Issue kubernetes-sigs#292 Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
According to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html, on HVM instances, sda1 and xvda are reserved for root partition. Also, the available block device range for xvd follow "/dev/xvd[b-c][a-z]" pattern. However commit 1ace946 violates the reserved device names and the naming logic. This causes volume attachment issues. For example, for instances where /dev/xvda is root partition, the driver tries to create a new device with the same reserved name. This change fixes the issue. Testing: Deployed Kube 1.14 cluster. Update manifest.yaml with canary images for sidecards and new names for API resources. Tested new plugin and created sc, pvc (pv) and pod. Volume attaches to node successfully. New device attached is "/dev/xvdba" as expected. Pod mounts volume and runs fine. Issue kubernetes-sigs#292 Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
According to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html, on HVM instances, sda1 and xvda are reserved for root partition. Also, the available block device range for xvd follow "/dev/xvd[b-c][a-z]" pattern. However commit 1ace946 violates the reserved device names and the naming logic. This causes volume attachment issues. For example, for instances where /dev/xvda is root partition, the driver tries to create a new device with the same reserved name. This change fixes the issue. Testing: Deployed Kube 1.14 cluster. Update manifest.yaml with canary images for sidecards and new names for API resources. Tested new plugin and created sc, pvc (pv) and pod. Volume attaches to node successfully. New device attached is "/dev/xvdba" as expected. Pod mounts volume and runs fine. Issue kubernetes-sigs#292 Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
According to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html, on HVM instances, sda1 and xvda are reserved for root partition. Also, the available block device range for xvd follow "/dev/xvd[b-c][a-z]" pattern. However commit 1ace946 violates the reserved device names and the naming logic. This causes volume attachment issues. For example, for instances where /dev/xvda is root partition, the driver tries to create a new device with the same reserved name. This change fixes the issue. Testing: Deployed Kube 1.14 cluster. Update manifest.yaml with canary images for sidecards and new names for API resources. Tested new plugin and created sc, pvc (pv) and pod. Volume attaches to node successfully. New device attached is "/dev/xvdba" as expected. Pod mounts volume and runs fine. Issue kubernetes-sigs#292 Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
/kind bug
What happened?
When trying to provision EBS volume, the attaching fails - the volume is stuck in "attaching" state.
Pod events:
The log excerpt from the driver:
What you expected to happen?
Volume gets attached just normally, pod starts.
How to reproduce it (as minimally and precisely as possible)?
Using the manifest with "canary" versions of the sidecars with RBAC updated to match Kubernetes changes (but I think I run into the same issue with the manifest as-is, i.e. the 1.0.1/1.0.2 versions of the sidecars) create a PVC and a pod using it:
Anything else we need to know?:
The EC2 GUI tells me the volume device is
/dev/xvda
which should be reserved for root devices according to the documentation -- not sure how this happens and if it's OK.Also -- the problem disappears if I revert changes made for PR #274...
Environment
kubectl version
):v1.15.0-alpha.2.150+6a48257627d3bc-dirty (git master HEAD)
master HEAD
The text was updated successfully, but these errors were encountered: