eksctl icon indicating copy to clipboard operation
eksctl copied to clipboard

eksctl v0.10.1 - Failure in creating nodegroup from config file

Open jchoi926 opened this issue 7 years ago • 15 comments

What happened? eksctl create nodegroup --config-file=<config-file> results in [✖] getting nodegroup stack summaries: mapping stack to nodegroup summary: error collecting Cloudformation outputs for stack <nodegroup>: no output "InstanceRoleARN" in stack "<nodegroup>"

What you expected to happen? Successfully create nodegroup

How to reproduce it? Run the above command

Anything else we need to know? config file:

  - name: <nodegroup>
    ami: <ami>
    instanceType: <instance-type>
    desiredCapacity: 1
    minSize: 1
    maxSize: 1
    volumeSize: 100
    volumeType: gp2
    privateNetworking: true
    labels:
      environment: <environment>
      nodegroup-type: <type>
    ssh:
      publicKeyName: <key-name>```

**Able to succesfully create the nodegroup with eksctl version 0.9.0**

**Versions**
Please paste in the output of these commands:

$ eksctl version [ℹ] version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.10.1"} $ kubectl version Client Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.7-eks-fa4c70", GitCommit:"fa4c703fa1706fac99d00d7f1f2080e9d4cc7eed", GitTreeState:"clean", BuildDate:"2019-07-23T03:14:24Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.6-eks-5047ed", GitCommit:"5047edce664593832e9b889e447ac75ab104f527", GitTreeState:"clean", BuildDate:"2019-08-21T22:32:40Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}


**Logs**
Include the output of the command line when running eksctl. If possible, eksctl should be run with debug logs. For example:

```eksctl create nodegroup --config-file <config-file>
[ℹ]  eksctl version 0.10.1
[ℹ]  using region <region>
[ℹ]  will use version 1.14 for new nodegroup(s) based on control plane version
[ℹ]  1 nodegroup(s) that already exist (nodegroup) will be excluded
[ℹ]  nodegroup "<nodegroup>" will use "<ami>" [AmazonLinux2/1.14]
[ℹ]  using EC2 key pair "<keypair>"
[ℹ]  1 nodegroup (<nodegroup>) was included (based on the include/exclude rules)
[ℹ]  combined exclude rules: <nodegroup>
[ℹ]  no nodegroups present in the current set were excluded by the filter
[ℹ]  will create a CloudFormation stack for each of 1 nodegroups in cluster "<cluster>"
[ℹ]  2 parallel tasks: { create nodegroup "<nodegroup>", no tasks }
[ℹ]  building nodegroup stack "<stack>"
[ℹ]  deploying stack "<stack>"
[✖]  unexpected status "ROLLBACK_IN_PROGRESS" while waiting for CloudFormation stack "<stack>"
[ℹ]  fetching stack events in attempt to troubleshoot the root cause of the failure
[ℹ]  1 error(s) occurred and nodegroups haven't been created properly, you may wish to check CloudFormation console
[ℹ]  to cleanup resources, run 'eksctl delete nodegroup --region=<region> --cluster=<cluster> --name=<name>' for each of the failed nodegroup
[✖]  waiting for CloudFormation stack "<stack>": ResourceNotReady: failed waiting for successful resource state
[✖]  failed to create nodegroups for cluster "<cluster>"```

jchoi926 avatar Nov 19 '19 18:11 jchoi926

Got the exact same issue here, using the same eksctl version (0.10.1), with and additional problem: now I can't manage my eks cluster at all. Any idea of how to fix this, other than creating a new cluster?

eksctl get nodegroups --cluster=<clustername>

[✖]  getting nodegroup stack summaries: mapping stack to nodegroup summary: error collecting Cloudformation outputs for stack <stackname>: no output "InstanceRoleARN" in stack "<stackname>"

manumatico avatar Nov 21 '19 01:11 manumatico

Same issue. Using 0.9.0 is fine.

moonnoon avatar Nov 21 '19 06:11 moonnoon

Got the exact same issue here, using the same eksctl version (0.10.1), with and additional problem: now I can't manage my eks cluster at all. Any idea of how to fix this, other than creating a new cluster?

eksctl get nodegroups --cluster=<clustername>

[✖]  getting nodegroup stack summaries: mapping stack to nodegroup summary: error collecting Cloudformation outputs for stack <stackname>: no output "InstanceRoleARN" in stack "<stackname>"

Install eksctl version 0.9.0. That should resolve your issue.

jchoi926 avatar Nov 21 '19 17:11 jchoi926

Might be worth seeing if 0.10.2 fixes your issue, it fixed it for me.

treacher avatar Nov 24 '19 22:11 treacher

Unfortunately I just got this on 0.10.2. Nodegroup was created with 0.10.20.

forsberg avatar Nov 29 '19 12:11 forsberg

Same issue here with commands such as eksctl --cluster my-cluster get ng gives output:

Error: getting nodegroup stack summaries: mapping stack to nodegroup summary: error collecting Cloudformation outputs for stack [stack-name]: no output "InstanceRoleARN" in stack "[stack-name]"

Happens while a stack is being created by another instance of eksctl and the related NodeInstanceRole is not yet created in CloudFormation. This actually prevents operations on the cluster via eksctl while a nodegroup is being created

Reproduced on both 0.10.2 and 0.14.0

PierreBeucher avatar Jan 22 '20 09:01 PierreBeucher

eksctl version: 0.13.0 (also, 0.15.0)

In my case, the attachPolicyARNs setting was wrong And After this problem, i cant manage the cluster like get all node group, update cluster.

Error: getting nodegroup stack summaries: mapping stack to nodegroup summary: error collecting Cloudformation outputs for stack [stack-name]: no output "InstanceRoleARN" in stack "[stack-name]"
or
[✖]  found 1 nodegroup(s) (stack name) without shared security group, cluster networking maybe be broken
[✖]  it's recommended to create new nodegroups, then delete old ones

[Solved] Just Go AWS CloudFormation Console and Delete stack of node group which has problem. FYI) eksctl delete nodegroup command not work for me.

tyg03485 avatar Mar 20 '20 02:03 tyg03485

I built a 1.14 EKS cluster with eksctl version 0.18.0.

I am now using eksctl version 0.20.0.

This command is failing: ➜ ~ eksctl get nodegroups --cluster=staging-kube Error: getting nodegroup stack summaries: getting nodegroup stacks: no eksctl-managed CloudFormation stacks found for "staging-kube"

The cluster was created with eksctl: Screen Shot 2020-05-28 at 11 29 59 AM

Do I need to downgrade my eksctl?

Update: Downgrading to 0.18.0 did not work. Maybe I created my cluster with another version. Or is the eksctl version even the problem here?

mellonbrook avatar May 28 '20 15:05 mellonbrook

@mellonbrook that issue and error message don't seem to be related to this one, did you have the error mentioned in the description

michaelbeaumont avatar Jun 17 '20 09:06 michaelbeaumont

@tyg03485 do you happen to recall what the problem with deleting the nodegroup was?

michaelbeaumont avatar Jun 17 '20 09:06 michaelbeaumont

@PierreBeucher Can you confirm that you're trying to call get ng while that nodegroup is still being created? Feel free to create another issue for your specific use case.

michaelbeaumont avatar Jun 18 '20 15:06 michaelbeaumont

As it stands, this issue is not reproducible. If anyone encounters the specific message (error collecting Cloudformation outputs for stack <nodegroup>: no output "InstanceRoleARN" in stack "<nodegroup>") in the OP, please include the entire config, the log output including the error as well as the exact steps leading to the error.

For other errors, create a new issue with the entire config, the log output including the error as well as the exact steps leading to the error.

michaelbeaumont avatar Jun 18 '20 16:06 michaelbeaumont

Hi, having the same issue on eksctl 0.21.0

 eksctl delete nodegroup --region=us-east-2 --cluster=test1 --name=test-workers-spot
[ℹ]  eksctl version 0.21.0
[ℹ]  using region us-east-2
[ℹ]  combined include rules: test-workers-spot
[ℹ]  1 nodegroup (test-workers-spot) was included (based on the include/exclude rules)
[ℹ]  will delete 1 nodegroups from auth ConfigMap in cluster "test1"
[!]  error getting instance role ARN for nodegroup "test-workers-spot": couldn't get iam configuration for nodegroup "test-workers-spot" (perhaps state "ROLLBACK_COMPLETE" is transitional): no output "InstanceRoleARN" in stack "eksctl-test1-nodegroup-test-workers-spot"

Update: found the reason, it happened when tried to create new nodegroup and there is no public network in the cluster, so the cloudformation stack failed. Deleted the stack and eksctl works again.

https://github.com/weaveworks/eksctl/issues/543

relgames avatar Jul 16 '20 19:07 relgames

Hi, it seems there is still same issue:

 ~  eksctl get nodegroup --cluster  solr-fradv-prod                                                                                                                     ok  1m 23s
2021-05-30 02:40:34 [ℹ]  eksctl version 0.52.0
2021-05-30 02:40:34 [ℹ]  using region us-east-1
2021-05-30 02:40:38 [!]  error collecting Cloudformation outputs for stack eksctl-solr-fradv-prod-nodegroup-workers-m5zn-medium: no output "InstanceRoleARN" in stack "eksctl-solr-fradv-prod-nodegroup-workers-m5zn-medium"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2add603]

goroutine 1 [running]:
github.com/weaveworks/eksctl/pkg/cfn/manager.(*StackCollection).getUnmanagedNodeGroupAutoScalingGroupName(0xc0002ce4d0, 0xc00061e400, 0xc000a9d680, 0xc0006746e0, 0x0, 0x0)
	/private/tmp/eksctl-20210528-31561-j8vlr6/pkg/cfn/manager/nodegroup.go:255 +0xe3
github.com/weaveworks/eksctl/pkg/cfn/manager.(*StackCollection).GetUnmanagedNodeGroupSummaries(0xc0002ce4d0, 0x0, 0x0, 0x9, 0x1, 0xc00079e180, 0xc000130078, 0xc000ae6d20)
	/private/tmp/eksctl-20210528-31561-j8vlr6/pkg/cfn/manager/nodegroup.go:194 +0x21b
github.com/weaveworks/eksctl/pkg/actions/nodegroup.(*Manager).GetAll(0xc0007811d0, 0xc00000c558, 0x0, 0xc0007811d0, 0x0, 0x3c3c9df)
	/private/tmp/eksctl-20210528-31561-j8vlr6/pkg/actions/nodegroup/get.go:16 +0x56
github.com/weaveworks/eksctl/pkg/ctl/get.doGetNodeGroup(0xc000726840, 0xc0005d0280, 0xc0003a0b40, 0x0, 0x0)
	/private/tmp/eksctl-20210528-31561-j8vlr6/pkg/ctl/get/nodegroup.go:77 +0x25c
github.com/weaveworks/eksctl/pkg/ctl/get.getNodeGroupCmd.func1(0xc00038fb80, 0xc0000da700, 0x0, 0x2, 0x0, 0x0)
	/private/tmp/eksctl-20210528-31561-j8vlr6/pkg/ctl/get/nodegroup.go:31 +0x9b
github.com/spf13/cobra.(*Command).execute(0xc00038fb80, 0xc0000da6e0, 0x2, 0x2, 0xc00038fb80, 0xc0000da6e0)
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc000139400, 0xc00071acb0, 0x1, 0xc000b3df70)
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
	/private/tmp/eksctl-20210528-31561-j8vlr6/cmd/eksctl/main.go:76 +0x41b

The problem was solved when I deleted the Cloudformation stack eksctl-solr-fradv-prod-nodegroup-workers-m5zn-medium

freedev avatar May 30 '21 00:05 freedev

Yea exactly, as others mentioned here. You'll usually have a rollback stack failing and you have to manually delete it from your Cloudformation dashabord. Once you do that, the command will work agai...

Polyhistor avatar Jun 29 '21 01:06 Polyhistor