Terraform v0.7.3
Just before it dies it describes image to get the root and ephemeral block device configuration
This is the last segment that gets successfully executed.
When creating Spot Fleet, Terraform crashes after the fleet has been created and before it saves the state.
Terraform should launch Spot Fleet and save the state of configuration.
Terraform exits abruptly and abandons the state, however Spot Fleet gets created and TF quits while trying to describe configuration.
terraform apply+1
Terraform v0.7.4
Terraform plan => ok
Terraform apply => panic: interface conversion: interface is nil, not string:
Error applying plan:
1 error(s) occurred:
* aws_spot_fleet_request.created_spot_fleet: 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 nil, not string
2016/09/23 11:51:25 [DEBUG] plugin: terraform:
2016/09/23 11:51:25 [DEBUG] plugin: terraform: goroutine 134 [running]:
2016/09/23 11:51:25 [DEBUG] plugin: terraform: panic(0x2523320, 0xc420419500)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/go/src/runtime/panic.go:500 +0x1a1
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.hashEphemeralBlockDevice(0x2474aa0, 0xc4207f1e30, 0xc4202096b8)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_spot_fleet_request.go:955 +0x213
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Set).hash(0xc4202096a0, 0x2474aa0, 0xc4207f1e30, 0x0, 0x5b0000c42005c400)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/set.go:180 +0x3d
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Set).add(0xc4202096a0, 0x2474aa0, 0xc4207f1e30, 0x412cc00, 0xc4205cb160, 0xc4207a91a8)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/set.go:167 +0x81
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Set).Add(0xc4202096a0, 0x2474aa0, 0xc4207f1e30)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/set.go:69 +0x44
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.ebsBlockDevicesToSet(0xc4205d3770, 0x2, 0x2, 0xc4201323e8, 0xc420209660)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_spot_fleet_request.go:848 +0x649
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.launchSpecToMap(0xc42032b5c0, 0xc4201323e8, 0xc42002e0f0)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_spot_fleet_request.go:753 +0x155
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.launchSpecsToSet(0xc42002e400, 0x1, 0x1, 0xc42002e0f0, 0xc4205ba100)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_spot_fleet_request.go:739 +0x158
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsSpotFleetRequestRead(0xc42037dd40, 0x21fcee0, 0xc420314180, 0x0, 0x0)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_spot_fleet_request.go:727 +0x3cc
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsSpotFleetRequestCreate(0xc42037dd40, 0x21fcee0, 0xc420314180, 0x2528640, 0x15d81)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_spot_fleet_request.go:617 +0xc43
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc42014f500, 0xc4204b6640, 0xc4201465a0, 0x21fcee0, 0xc420314180, 0x1, 0xc4203c3230, 0x0)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/resource.go:162 +0x30e
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc420684960, 0xc420127f80, 0xc4204b6640, 0xc4201465a0, 0x0, 0x18, 0x18)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/provider.go:178 +0x9b
2016/09/23 11:51:25 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc42069a2c0, 0xc42068bdc0, 0xc420134880, 0x0, 0x0)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/plugin/resource_provider.go:460 +0x57
2016/09/23 11:51:25 [DEBUG] plugin: terraform: reflect.Value.call(0xc42049e3c0, 0xc4201b8000, 0x13, 0x2a63bf3, 0x4, 0xc4207a9ed0, 0x3, 0x3, 0x22d7320, 0xc42037daa0, ...)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/go/src/reflect/value.go:434 +0x5c8
2016/09/23 11:51:25 [DEBUG] plugin: terraform: reflect.Value.Call(0xc42049e3c0, 0xc4201b8000, 0x13, 0xc4207a9ed0, 0x3, 0x3, 0xc4207fe014, 0x100000000, 0xc42035d701)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/go/src/reflect/value.go:302 +0xa4
2016/09/23 11:51:25 [DEBUG] plugin: terraform: net/rpc.(*service).call(0xc420664200, 0xc4206641c0, 0xc4206a0240, 0xc420352300, 0xc4206ac9a0, 0x21fec20, 0xc42068bdc0, 0x16, 0x21fec60, 0xc420134880, ...)
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/go/src/net/rpc/server.go:383 +0x148
2016/09/23 11:51:25 [DEBUG] plugin: terraform: created by net/rpc.(*Server).ServeCodec
2016/09/23 11:51:25 [DEBUG] plugin: terraform: /opt/go/src/net/rpc/server.go:477 +0x421
2016/09/23 11:51:25 [DEBUG] root: eval: *terraform.EvalWriteState
2016/09/23 11:51:25 [DEBUG] root: eval: *terraform.EvalApplyProvisioners
2016/09/23 11:51:25 [DEBUG] root: eval: *terraform.EvalIf
2016/09/23 11:51:25 [DEBUG] root: eval: *terraform.EvalWriteState
2016/09/23 11:51:25 [DEBUG] root: eval: *terraform.EvalWriteDiff
2016/09/23 11:51:25 [DEBUG] root: eval: *terraform.EvalApplyPost
2016/09/23 11:51:25 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:
* aws_spot_fleet_request.created_spot_fleet: unexpected EOF
2016/09/23 11:51:25 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
* aws_spot_fleet_request.created_spot_fleet: unexpected EOF
2016/09/23 11:51:25 [ERROR] root: eval: *terraform.EvalOpFilter, err: 1 error(s) occurred:
* aws_spot_fleet_request.created_spot_fleet: unexpected EOF
2016/09/23 11:51:25 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
* aws_spot_fleet_request.created_spot_fleet: unexpected EOF
2016/09/23 11:51:25 [TRACE] [walkApply] Exiting eval tree: aws_spot_fleet_request.created_spot_fleet
2016/09/23 11:51:25 [DEBUG] vertex provider.aws (close), got dep: aws_spot_fleet_request.created_spot_fleet
2016/09/23 11:51:25 [DEBUG] vertex root, got dep: provider.aws (close)
2016/09/23 11:51:25 [DEBUG] vertex root, got dep: output.templates
2016/09/23 11:51:25 [DEBUG] plugin: /Users/andrey/work/bin/terraform-0.7.4/terraform: plugin process exited
2016/09/23 11:51:25 [TRACE] Preserving existing state lineage "914c60d1-6556-409e-a495-7c6ead77edbf"
2016/09/23 11:51:25 [TRACE] Preserving existing state lineage "914c60d1-6556-409e-a495-7c6ead77edbf"
2016/09/23 11:51:25 [DEBUG] plugin: waiting for all plugin processes to complete...
2016/09/23 11:51:25 [DEBUG] plugin: /Users/andrey/work/bin/terraform-0.7.4/terraform: plugin process exited
2016/09/23 11:51:25 [DEBUG] plugin: /Users/andrey/work/bin/terraform-0.7.4/terraform: plugin process exited
+1
terraform 0.7.3
Unexpected EOF in spot fleet also causes other operations fail to save their states, such as creating autoscaling groups.
In case it helps: Here's a ZIP containing a template that reproduces (what appears to be) the same issue. It's affecting me on Terraform 0.7.5 (but also occurred in 0.7.4).
If you comment out the second ebs_block_device in the launch_specification (/dev/xvdcz), it works.
Hi @stack72, are you able to help with this issue?
Hi! Thanks for reporting the bug, and really sorry for any issues it has caused you. I'm taking a look at this, so thanks for the detailed information. Really helpful.
I've reproduced the issue in terraform 0.7.8 and tip.
I've got a fix into master for this, but we _just_ missed the 0.7.9 release, so it'll be in the next release. If you have any questions or problems before that, please feel free to open an issue and we'll get it resolved. Thanks for reporting!
Thanks a lot @paddyforan !
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.
Most helpful comment
I've got a fix into master for this, but we _just_ missed the 0.7.9 release, so it'll be in the next release. If you have any questions or problems before that, please feel free to open an issue and we'll get it resolved. Thanks for reporting!