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

plug in crash when doing a terraform apply on EKS. #21140

Closed
yongninghu opened this issue Oct 4, 2021 · 4 comments
Closed

plug in crash when doing a terraform apply on EKS. #21140

yongninghu opened this issue Oct 4, 2021 · 4 comments
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/eks Issues and PRs that pertain to the eks service.

Comments

@yongninghu
Copy link

yongninghu commented Oct 4, 2021

Stack trace from the terraform-provider-aws_v3.56.0_x5 plugin:

panic: interface conversion: interface {} is nil, not *aws.AWSClient

goroutine 168 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsEksNodeGroupRead(0x8040f98, 0xc0006b0fc0, 0xc0006dc580, 0x0, 0x0, 0xc00243fc60, 0xc002459908, 0x40e0f8)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/aws/resource_aws_eks_node_group.go:374 +0x201f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000a60c40, 0x8040f28, 0xc0006be680, 0xc0006dc580, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.0.2-0.20210714181518-b5a3dc95a675/helper/schema/resource.go:347 +0x17f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000a60c40, 0x8040f28, 0xc0006be680, 0xc002416150, 0x0, 0x0, 0xc0006d05c0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.0.2-0.20210714181518-b5a3dc95a675/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000134e40, 0x8040f28, 0xc0006be680, 0xc0006be6c0, 0xc0006be680, 0x40b965, 0x6f7ccc0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.0.2-0.20210714181518-b5a3dc95a675/helper/schema/grpc_provider.go:575 +0x43b
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc0025c8920, 0x8040fd0, 0xc0006be680, 0xc0006b07e0, 0xc0025c8920, 0xc0006b37d0, 0xc0005c7ba0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/server/server.go:298 +0x105
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x72663c0, 0xc0025c8920, 0x8040fd0, 0xc0006b37d0, 0xc0006b0780, 0x0, 0x8040fd0, 0xc0006b37d0, 0xc002412000, 0x4b1)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00086d500, 0x8063278, 0xc00182b380, 0xc0006c2500, 0xc0004b1c80, 0xb9af550, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc00086d500, 0x8063278, 0xc00182b380, 0xc0006c2500, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0017eca30, 0xc00086d500, 0x8063278, 0xc00182b380, 0xc0006c2500)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd

Error: The terraform-provider-aws_v3.56.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Production Sequence If I remember correctly:
create a EKS cluster.
edit a variable, then terraform apply the change, while the apply is running, cancel it.
terraform apply again.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Oct 4, 2021
@ewbankkit ewbankkit added service/eks Issues and PRs that pertain to the eks service. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 4, 2021
@wilson
Copy link

wilson commented Oct 5, 2021

Yep, same here:

Stack trace from the terraform-provider-aws_v3.61.0_x5 plugin:

panic: interface conversion: interface {} is nil, not *aws.AWSClient

goroutine 25 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsIamRolePolicyAttachmentRead(0xc00020d500, 0x0, 0x0, 0xbd49aa0, 0xbd19da0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go:59 +0x7d9
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000bbd880, 0x8294cc8, 0xc00009f380, 0xc00020d500, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.7.1-0.20210913224932-c7c2dbd9e010/helper/schema/resource.go:335 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000bbd880, 0x8294cc8, 0xc00009f380, 0xc000b6a1c0, 0x0, 0x0, 0xc0001acac8, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.7.1-0.20210913224932-c7c2dbd9e010/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00000c810, 0x8294cc8, 0xc00009f380, 0xc00009f480, 0xc00009f380, 0x40b965, 0x7172c80)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.7.1-0.20210913224932-c7c2dbd9e010/helper/schema/grpc_provider.go:575 +0x43b
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc0018c87a0, 0x8294d70, 0xc00009f380, 0xc002176d80, 0xc0018c87a0, 0xc001c43860, 0xc00234dba0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/server/server.go:298 +0x105
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x74690a0, 0xc0018c87a0, 0x8294d70, 0xc001c43860, 0xc002176d20, 0x0, 0x8294d70, 0xc001c43860, 0xc001e74100, 0xf4)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000141880, 0x82b8af8, 0xc000322180, 0xc0003a8500, 0xc00132e990, 0xbd07f30, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000141880, 0x82b8af8, 0xc000322180, 0xc0003a8500, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00077ae50, 0xc000141880, 0x82b8af8, 0xc000322180, 0xc0003a8500)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd

Error: The terraform-provider-aws_v3.61.0_x5 plugin crashed!

In my case, the trigger was changing the name of the EKS cluster's IAM role. The apply failed, and subsequent plans encounter this error.

@justinretzolk
Copy link
Member

Hi @yongninghu 👋 Terraform v1.0.9 was released yesterday which includes a fix that should correct this. Can you test again with this newer version to verify that you're no longer experience this issue?

@justinretzolk justinretzolk added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 14, 2021
@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Oct 25, 2021
@github-actions
Copy link

github-actions bot commented Jun 1, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/eks Issues and PRs that pertain to the eks service.
Projects
None yet
Development

No branches or pull requests

4 participants