hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.42k stars 9.51k forks source link

Terraform crash on aws_emr_instance_group resize #15649

Closed synhershko closed 7 years ago

synhershko commented 7 years ago

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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
hashibot commented 7 years ago

This issue has been automatically migrated to terraform-providers/terraform-provider-aws#1264 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to this issue and let us know.

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 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.