hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

Terraform crash on aws_emr_instance_group resize #1264

Closed hashibot closed 7 years ago

hashibot commented 7 years ago

This issue was originally opened by @synhershko as hashicorp/terraform#15649. It was migrated here as a result of the provider split. The original body of the issue is below.


Using Terraform v0.10.0-rc1-dev on linux mint 64bit, I executed terraform apply setting an aws_emr_instance_group from 5 to 0, and got the following crash:

aws_emr_instance_group.core-nodes: Still modifying... (ID: ig-2PW30KB5TCX7N, 10s elapsed)
Error applying plan:

1 error(s) occurred:

* aws_emr_instance_group.core-nodes: 1 error(s) occurred:

* aws_emr_instance_group.core-nodes: unexpected EOF

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
panic: interface conversion: interface {} is *emr.EMR, not *aws.AWSClient
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4: 
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4: goroutine 445 [running]:
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4: github.com/terraform-providers/terraform-provider-aws/aws.fetchAllEMRInstanceGroups(0x1fbbde0, 0xc4203fc310, 0xc42041ea00, 0xf, 0x17dc1, 0x1625e7da, 0xc42004ec58, 0x4457bb, 0x32b5dc0)
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go:190 +0x750
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4: github.com/terraform-providers/terraform-provider-aws/aws.fetchEMRInstanceGroup(0x1fbbde0, 0xc4203fc310, 0xc42041ea00, 0xf, 0xc42041e9a0, 0x10, 0xc42004ece0, 0x139a824, 0x18)
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go:225 +0x56
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4: github.com/terraform-providers/terraform-provider-aws/aws.instanceGroupStateRefresh.func1(0xc42004ef20, 0xc42066af60, 0x0, 0x1, 0xc4204260a0, 0x2)
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go:285 +0x5b
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/resource.(*StateChangeConf).WaitForState.func1(0xc420664960, 0xc4201b1ea0, 0xc4206a9200, 0xc4206649c0, 0xc42041ab00, 0xc42041aa78)
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/resource/state.go:103 +0x1c8
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4: created by github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/resource.(*StateChangeConf).WaitForState
2017/07/27 21:01:06 [DEBUG] plugin: terraform-provider-aws_v0.1.2_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/resource/state.go:195 +0x249
2017/07/27 21:01:06 [DEBUG] root: eval: *terraform.EvalWriteState
2017/07/27 21:01:06 [DEBUG] root: eval: *terraform.EvalApplyProvisioners
2017/07/27 21:01:06 [DEBUG] root: eval: *terraform.EvalIf
2017/07/27 21:01:06 [DEBUG] root: eval: *terraform.EvalWriteState
2017/07/27 21:01:06 [DEBUG] root: eval: *terraform.EvalWriteDiff
2017/07/27 21:01:06 [DEBUG] root: eval: *terraform.EvalApplyPost
2017/07/27 21:01:06 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* aws_emr_instance_group.core-nodes: unexpected EOF
2017/07/27 21:01:06 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* aws_emr_instance_group.core-nodes: unexpected EOF
2017/07/27 21:01:06 [TRACE] [walkApply] Exiting eval tree: aws_emr_instance_group.core-nodes
2017/07/27 21:01:06 [DEBUG] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2017/07/27 21:01:06 [DEBUG] dag/walk: upstream errored, not walking "provider.aws (close)"
2017/07/27 21:01:06 [DEBUG] dag/walk: upstream errored, not walking "root"
2017/07/27 21:01:06 [DEBUG] plugin: ./terraforming/emr/.terraform/plugins/linux_amd64/terraform-provider-aws_v0.1.2_x4: plugin process exited
2017/07/27 21:01:06 [TRACE] Preserving existing state lineage "e613016e-39a8-457a-928a-3332af56661e"
2017/07/27 21:01:06 [TRACE] Preserving existing state lineage "e613016e-39a8-457a-928a-3332af56661e"
2017/07/27 21:01:06 [TRACE] Preserving existing state lineage "e613016e-39a8-457a-928a-3332af56661e"
2017/07/27 21:01:06 [TRACE] Preserving existing state lineage "e613016e-39a8-457a-928a-3332af56661e"
2017/07/27 21:01:06 [DEBUG] plugin: waiting for all plugin processes to complete...
2017/07/27 21:01:06 [WARN] plugin: error closing client during Kill: connection is shut down

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
catsby commented 7 years ago

Thanks for the report @synhershko , we'll take a look!

catsby commented 7 years ago

Thanks again @synhershko, this should be addressed in #1287

synhershko commented 7 years ago

Thanks for the quick fix!

ghost commented 4 years ago

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!