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

omitting instanceType with instancesDistribution causes it to pick m5.large #845

Closed
mdaniel opened this issue Jun 6, 2019 · 1 comment · Fixed by #851
Closed

omitting instanceType with instancesDistribution causes it to pick m5.large #845

mdaniel opened this issue Jun 6, 2019 · 1 comment · Fixed by #851
Labels
Milestone

Comments

@mdaniel
Copy link

mdaniel commented Jun 6, 2019

What happened?

If one omits instanceType: which is permissible, eksctl will insert m5.large even though the instanceTypes: do not contain any m5

This causes two bad things: misleading nodegroup output:

$ eksctl get nodegroups --cluster eks0
eks0	p2-xl		2019-06-05T18:30:09Z	1		16		1			m5.large	ami-0923e4b35a30a5f53

and, related to #844, it acts as if the nodegroup is composed of m5.large and thus throws off the GPU AMI detection:

2019-06-05T17:39:11-07:00 [▶]  resolving AMI using StaticGPUResolver for region us-west-2, instanceType m5.large and imageFamily AmazonLinux2
2019-06-05T17:39:11-07:00 [▶]  can't resolve AMI using StaticGPUResolver as instance type m5.large is non-GPU
2019-06-05T17:39:11-07:00 [▶]  resolving AMI using StaticDefaultResolver for region us-west-2, version 1.12, instanceType m5.large and imageFamily AmazonLinux2
2019-06-05T17:39:11-07:00 [ℹ]  nodegroup "p2-xl" will use "ami-0923e4b35a30a5f53" [AmazonLinux2/1.12]

What you expected to happen?

It should treat instanceType: as being mixed, the only other supported value when using instancesDistribution

How to reproduce it?

nodeGroups:
- name: p2-xl
  desiredCapacity: 1
  instancesDistribution:
    instanceTypes:
    - p2.xlarge
    - p2.8xlarge
    - p2.16xlarge
    maxPrice: 0.50
$ eksctl create nodegroup --config-file foo.yml

Anything else we need to know?

  • macOS
  • brew install weaveworks/tap/eksctl
  • ~/.aws/config with an MFA

Versions
Please paste in the output of these commands:

$ eksctl version
[ℹ]  version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.1.34"}
$ uname -a
Darwin mdaniel.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-21T23:03:55Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.6-eks-d69f1b", GitCommit:"d69f1bf3669bf00b7f4a758e978e0e7a1e3a68f7", GitTreeState:"clean", BuildDate:"2019-02-28T20:26:10Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

Logs

2019-06-05T17:39:09-07:00 [ℹ]  using region us-west-2
2019-06-05T17:39:10-07:00 [▶]  cluster = {
  Arn: "arn:aws:eks:us-west-2:XXXXXXXXXXXX:cluster/eks0",
  CertificateAuthority: {
    Data: "LS0tLS:snip:="
  },
  CreatedAt: 2019-06-05 18:18:58 +0000 UTC,
  Endpoint: "https://example.com",
  Logging: {
    ClusterLogging: [{
        Enabled: false,
        Types: [
          "api",
          "audit",
          "authenticator",
          "controllerManager",
          "scheduler"
        ]
      }]
  },
  Name: "eks0",
  PlatformVersion: "eks.2",
  ResourcesVpcConfig: {
    EndpointPrivateAccess: false,
    EndpointPublicAccess: true,
    SecurityGroupIds: ["sg-00810e48d599e0036"],
    SubnetIds: [
      "subnet-04b2b23d69608ab3a",
      "subnet-0a38d42ee58643879",
      "subnet-0c1865407f313bed4",
      "subnet-08db182c4d36813ab",
      "subnet-09efa7a5a407a81b0",
      "subnet-019756b4261d1276a",
      "subnet-0ef1ee611663c1aef",
      "subnet-0f40edff1302cb28c"
    ],
    VpcId: "vpc-0967356bc85cdb80e"
  },
  RoleArn: "arn:aws:iam::XXXXXXXXXXXX:role/eksctl-eks0-cluster-ServiceRole-QLAEZCL767W3",
  Status: "ACTIVE",
  Version: "1.12"
}
2019-06-05T17:39:10-07:00 [ℹ]  will use version 1.12 for new nodegroup(s) based on control plane version
2019-06-05T17:39:11-07:00 [▶]  nodegroups = []
2019-06-05T17:39:11-07:00 [▶]  resolving AMI using StaticGPUResolver for region us-west-2, instanceType m5.large and imageFamily AmazonLinux2
2019-06-05T17:39:11-07:00 [▶]  can't resolve AMI using StaticGPUResolver as instance type m5.large is non-GPU
2019-06-05T17:39:11-07:00 [▶]  resolving AMI using StaticDefaultResolver for region us-west-2, version 1.12, instanceType m5.large and imageFamily AmazonLinux2
2019-06-05T17:39:11-07:00 [ℹ]  nodegroup "p2-xl" will use "ami-0923e4b35a30a5f53" [AmazonLinux2/1.12]
@martina-if
Copy link
Contributor

Hi @mdaniel, thank you for the detailed report! I see we have a bug there. I am looking into this now.

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

Successfully merging a pull request may close this issue.

3 participants