Skip to content
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

no provisioned IOPS with root volume #6770

Closed
mmailhos opened this issue Apr 12, 2019 · 1 comment
Closed

no provisioned IOPS with root volume #6770

mmailhos opened this issue Apr 12, 2019 · 1 comment

Comments

@mmailhos
Copy link
Contributor

1. What kops version are you running? The command kops version, will display
this information.

Version 1.11.0
Note that I have also tried and reproduced the bug with 1.11.1 and 1.12.0.

2. What Kubernetes version are you running? kubectl version will print the
version if a cluster is running or provide the Kubernetes version specified as
a kops flag.

1.10

3. What cloud provider are you using?
AWS

4. What commands did you run? What is the simplest way to reproduce this issue?

kops --name mycluster get ig nodes-myproject -o yaml

apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
  creationTimestamp: 2019-04-12T00:39:18Z
  labels:
    kops.k8s.io/cluster: k8s.internal
  name: nodes-myproject-backend
spec:
  cloudLabels:
    Project: myProject
  image: kope.io/k8s-1.10-debian-jessie-amd64-hvm-ebs-2018-08-17
  machineType: c4.8xlarge
  maxSize: 1
  minSize: 1
  nodeLabels:
    kops.k8s.io/instancegroup: nodes-myproject-backend
  role: Node
  rootVolumeIops: 10000
  rootVolumeSize: 100
  rootVolumeType: io1
  subnets:
  - us-west-2
  taints:
  - myproject=backend:NoSchedule

Then applying with target=terraform (error reproduced with cloudformation)

resource "aws_launch_configuration" "nodes-myproject-backend-k8s-internal" {
  name_prefix                 = "nodes-myproject-backend.k8s.internal-"
  image_id                    = "ami-09405512139fde02"
  instance_type               = "c4.8xlarge"
  key_name                    = "${aws_key_pair.kubernetes-k8s-internal-553d6aacd98d3do6a8.id}"
  iam_instance_profile        = "${aws_iam_instance_profile.nodes-k8s-internal.id}"
  security_groups             = ["${aws_security_group.nodes-k8s-internal.id}"]
  associate_public_ip_address = false
  user_data                   = "${file("${path.module}/data/aws_launch_configuration_nodes-myproject-backend.k8s..internal_user_data")}"

  root_block_device = {
    volume_type           = "io1"
    volume_size           = 100
    delete_on_termination = true
  }

  lifecycle = {
    create_before_destroy = true
  }

  enable_monitoring = false
}

5. What happened after the commands executed?

Error: Error applying plan:

1 error(s) occurred:

* aws_launch_configuration.myproject-backend-k8s-internal: 1 error(s) occurred:

* aws_launch_configuration.nodes-myproject-backend-k8s-internal: Error creating launch configuration: ValidationError: Iops is required for a provisioned IOPS volume.
    status code: 400, request id: 10a7415d-5cc5-11e9-a37a-a9912f1646e6

In the logs (with -v 10), I can see on line 80103 executor.go:178] Executing task "AutoscalingGroup a json object that properly includes:

    "RootVolumeSize": 100,
    "RootVolumeType": "io1",
    "RootVolumeIops": 10000,

Finally ending with:

 I0412 15:13:45.397534   80103 executor.go:103] Tasks: 115 done / 115 total; 0 can run
 I0412 15:13:45.419173   80103 target.go:312] Terraform output is in out/terraform

kops seems to be properly parsing my yaml file but is not able to generate the right target (either terraform or cloudformation).

6. What did you expect to happen?

aws_launch_configuration.root_volume should include iops = 10000 in terraform then terraform applies successfully.

@joshbranham
Copy link
Contributor

@MathieuMailhos looks like we are not carrying the rootVolumeIops value through for CF/Terraform:

type terraformBlockDevice struct {
// For ephemeral devices
DeviceName *string `json:"device_name,omitempty"`
VirtualName *string `json:"virtual_name,omitempty"`
// For root
VolumeType *string `json:"volume_type,omitempty"`
VolumeSize *int64 `json:"volume_size,omitempty"`
// Encryption
Encrypted *bool `json:"encrypted,omitempty"`
// Termination
DeleteOnTermination *bool `json:"delete_on_termination,omitempty"`
}

Unless I am missing something else, this sounds like a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants