kops: Error attaching EBS volume to instance IncorrectState Status code 400

Hi guys, I have a reproducible issue with dynamic provisioning EBS volumes. Basically, on a fresh cluster any attempt at using a deployment to provision an EBS volume results in a failure to attach the volume (however I think that the volume gets attached to the node) Here is the error message from the dashboard:

[SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "data-helm-elastic-elasticsearch-data-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "data-helm-elastic-elasticsearch-data-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "data-helm-elastic-elasticsearch-data-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "data-helm-elastic-elasticsearch-data-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "data-helm-elastic-elasticsearch-data-0", which is unexpected.]
Failed to attach volume "pvc-4f501f74-8490-11e7-89c0-0a47f1972d2a" on node "ip-10-230-69-212.us-east-2.compute.internal" with: Error attaching EBS volume "vol-072cca03da4e963e6" to instance "i-0418a3b1a5f0a0146": IncorrectState: vol-072cca03da4e963e6 is not 'available'. status code: 400, request id: 521efe2a-4298-4fe9-8a07-8ff4870c20c6

I installed the cluster like this in US-EAST-2 (Ohio):

cmd: kops create cluster --associate-public-ip=false --cloud=aws --bastion=false --dns-zone=redacted --kubernetes-version=1.6.2 --master-size=t2.medium --master-volume-size=60 --master-zones=us-east-2a,us-east-2b,us-east-2c --network-cidr=10.230.0.0/16 --networking=weave --node-count=2 --node-size=t2.large --node-volume-size=128 --target=direct --topology=private --zones=us-east-2a,us-east-2b,us-east-2c --ssh-public-key=~/.ssh/id_rsa.pub --name=redacted --state s3://k8s-us-east

next I did a helm init

then did a helm install of an elastic search where I reduced the values of the replicas down to 1 ( to save spaceon the test. I have attached the values.yaml file to this ticket.

helm install --name helm-elastic incubator/elasticsearch --namespace staging --debug -f values.yaml

the values.yaml file looks like this, only think I changed was the replicas down to 1

image:
  repository: "jetstack/elasticsearch-pet"
  tag: "2.4.0"
  pullPolicy: "Always"

cluster:
  name: "elasticsearch"
  config:


client:
  name: client
  replicas: 1
  serviceType: ClusterIP
  heapSize: "128m"
  antiAffinity: "soft"
  resources:
    limits:
      cpu: "1"
      memory: "512Mi"
    requests:
      cpu: "25m"
      memory: "256Mi"

master:
  name: master
  replicas: 1
  heapSize: "128m"
  antiAffinity: "soft"
  resources:
    limits:
      cpu: "1"
      memory: "512Mi"
    requests:
      cpu: "25m"
      memory: "256Mi"

data:
  name: data
  replicas: 1
  heapSize: "1536m"
  storage: "30Gi"
  # storageClass: "ssd"
  terminationGracePeriodSeconds: 3600
  antiAffinity: "soft"
  resources:
    limits:
      cpu: "1"
      memory: "512Mi"
    requests:
      cpu: "25m"
      memory: "256Mi"

You guys should be able to reproduce this failure pretty easily. I’ve done some googling and one indication of the issue could be that we don’t pass cloud provider=aws on the scheduler command line. I checked my scheduler command line and didn’t see it there and my searching of kops issues shows that it isn’t available via the api.

some Links: https://github.com/kubernetes/kubernetes/issues/45726 https://groups.google.com/forum/#!topic/kubernetes-users/VshrZGFOmbo

@chrislovecnm - if you could take a look at this I would be in your debt!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 23 (19 by maintainers)

Most upvoted comments

I tried to use a helm chart to install consul which uses a statefulset… Here are the events:

kubectl -n prod get events
LASTSEEN   FIRSTSEEN   COUNT     NAME                       KIND      SUBOBJECT   TYPE      REASON             SOURCE                 MESSAGE
54m        1h          127       consul-2-193574860-v42td   Pod                   Warning   FailedScheduling   {default-scheduler }   pod (consul-2-193574860-v42td) failed to fit in any node
fit failure summary on nodes : NoVolumeZoneConflict (7), PodToleratesNodeTaints (3)
1s        53m       185       consul-2-193574860-v42td    Pod                 Warning   FailedScheduling   {default-scheduler }   [SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul02" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul02" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul02" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul02" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul02" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul02" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul02" not found, which is unexpected.]
54m       1h        127       consul-3-1318303696-drxjk   Pod                 Warning   FailedScheduling   {default-scheduler }   pod (consul-3-1318303696-drxjk) failed to fit in any node
fit failure summary on nodes : NoVolumeZoneConflict (7), PodToleratesNodeTaints (3)
1m        53m       182       consul-3-1318303696-drxjk   Pod                 Warning   FailedScheduling   {default-scheduler }          [SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul03" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul03" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul03" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul03" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul03" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul03" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "pvc-consul03" not found, which is unexpected.]
8s        69d       598340    get-usage                   Ingress             Warning   MAPPING            {nginx-ingress-controller }   Ingress rule 'prod/get-usage' contains no path definition. Assuming /
11s       69d       23244     get-usage                   Ingress             Normal    CREATE             {nginx-ingress-controller }   ip: 192.168.51.176
11s       69d       46487     get-usage                   Ingress             Normal    UPDATE             {nginx-ingress-controller }   prod/get-usage
11s       8d        46484     get-usage                   Ingress             Normal    UPDATE             {ingress-controller }         Ingress prod/get-usage
8s        69d       598340    metabase                    Ingress             Warning   MAPPING            {nginx-ingress-controller }   Ingress rule 'prod/metabase' contains no path definition. Assuming /
3m        3m        2         v1-consul-0                 Pod                 Warning   FailedScheduling   {default-scheduler }          [SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-v1-consul-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-v1-consul-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-v1-consul-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-v1-consul-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-v1-consul-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-v1-consul-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-v1-consul-0", which is unexpected.]
3m        3m        1         v1-consul-0                 Pod                 Normal    Scheduled          {default-scheduler }          Successfully assigned v1-consul-0 to ip-192-168-41-163.ec2.internal
3m        3m        2         v1-consul-0                 Pod                 Warning   FailedMount        {controller-manager }         Failed to attach volume "pvc-83ebbfd9-8dbe-11e7-803c-127d03959be4" on node "ip-192-168-41-163.ec2.internal" with: Error attaching EBS volume "vol-0bec38d6c69b51bf1" to instance "i-03545e99dacef503c": IncorrectState: vol-0bec38d6c69b51bf1 is not 'available'.
          status code: 400, request id:
3m        3m        1         v1-consul-0   Pod           spec.containers{v1-consul}   Normal    Pulling                {kubelet ip-192-168-41-163.ec2.internal}   pulling image "consul:0.8.3"
3m        3m        1         v1-consul-0   Pod           spec.containers{v1-consul}   Normal    Pulled                 {kubelet ip-192-168-41-163.ec2.internal}   Successfully pulled image "consul:0.8.3"
3m        3m        1         v1-consul-0   Pod           spec.containers{v1-consul}   Normal    Created                {kubelet ip-192-168-41-163.ec2.internal}   Created container with docker id f506f4b6641d; Security:[seccomp=unconfined]
3m        3m        1         v1-consul-0   Pod           spec.containers{v1-consul}   Normal    Started                {kubelet ip-192-168-41-163.ec2.internal}   Started container with docker id f506f4b6641d
3m        3m        1         v1-consul-1   Pod                                        Normal    Scheduled              {default-scheduler }                       Successfully assigned v1-consul-1 to ip-192-168-80-40.ec2.internal
3m        3m        1         v1-consul-1   Pod           spec.containers{v1-consul}   Normal    Pulling                {kubelet ip-192-168-80-40.ec2.internal}    pulling image "consul:0.8.3"
3m        3m        1         v1-consul-1   Pod           spec.containers{v1-consul}   Normal    Pulled                 {kubelet ip-192-168-80-40.ec2.internal}    Successfully pulled image "consul:0.8.3"
3m        3m        1         v1-consul-1   Pod           spec.containers{v1-consul}   Normal    Created                {kubelet ip-192-168-80-40.ec2.internal}    Created container with docker id 9f259b6e8223; Security:[seccomp=unconfined]
3m        3m        1         v1-consul-1   Pod           spec.containers{v1-consul}   Normal    Started                {kubelet ip-192-168-80-40.ec2.internal}    Started container with docker id 9f259b6e8223
3m        3m        1         v1-consul-2   Pod                                        Normal    Scheduled              {default-scheduler }                       Successfully assigned v1-consul-2 to ip-192-168-97-103.ec2.internal
2m        2m        1         v1-consul-2   Pod           spec.containers{v1-consul}   Normal    Pulling                {kubelet ip-192-168-97-103.ec2.internal}   pulling image "consul:0.8.3"
2m        2m        1         v1-consul-2   Pod           spec.containers{v1-consul}   Normal    Pulled                 {kubelet ip-192-168-97-103.ec2.internal}   Successfully pulled image "consul:0.8.3"
2m        2m        1         v1-consul-2   Pod           spec.containers{v1-consul}   Normal    Created                {kubelet ip-192-168-97-103.ec2.internal}   Created container with docker id b04dfcf56346; Security:[seccomp=unconfined]
2m        2m        1         v1-consul-2   Pod           spec.containers{v1-consul}   Normal    Started                {kubelet ip-192-168-97-103.ec2.internal}   Started container with docker id b04dfcf56346
3m        3m        1         v1-consul     StatefulSet                                Normal    SuccessfulCreate       {statefulset }                             pvc: datadir-v1-consul-0
3m        3m        1         v1-consul     StatefulSet                                Normal    SuccessfulCreate       {statefulset }                             pet: v1-consul-0
3m        3m        1         v1-consul     StatefulSet                                Normal    SuccessfulCreate       {statefulset }                             pvc: datadir-v1-consul-1
3m        3m        1         v1-consul     StatefulSet                                Normal    SuccessfulCreate       {statefulset }                             pvc: datadir-v1-consul-2
3m        3m        1         v1-consul     StatefulSet                                Normal    SuccessfulCreate       {statefulset }                             pet: v1-consul-1
3m        3m        1         v1-consul     StatefulSet                                Normal    SuccessfulCreate       {statefulset }                             pet: v1-consul-2
32m       32m       1         vault-1       Service                                    Normal    DeletingLoadBalancer   {service-controller }                      Deleting load balancer
31m       31m       1         vault-1       Service                                    Normal    DeletedLoadBalancer    {service-controller }                      Deleted load balancer
31m       31m       1         vault-2       Service                                    Normal    DeletingLoadBalancer   {service-controller }                      Deleting load balancer
29m       29m       1         vault-2       Service                                    Normal    DeletedLoadBalancer    {service-controller }                      Deleted load balancer
29m       29m       1         vault-lb      Service                                    Normal    DeletingLoadBalancer   {service-controller }                      Deleting load balancer
27m       27m       1         vault-lb      Service                                    Normal    DeletedLoadBalancer    {service-controller }                      Deleted load balancer