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

panic reading ansible inventory #5

Closed
mbordas09 opened this issue Apr 23, 2019 · 3 comments
Closed

panic reading ansible inventory #5

mbordas09 opened this issue Apr 23, 2019 · 3 comments

Comments

@mbordas09
Copy link

mbordas09 commented Apr 23, 2019

$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.yaml_map_of_strings.normal: Refreshing state...

Error: Error refreshing state: 1 error(s) occurred:

* data.yaml_map_of_strings.normal: 1 error(s) occurred:

* data.yaml_map_of_strings.normal: data.yaml_map_of_strings.normal: unexpected EOF


panic: reflect: call of reflect.Value.Interface on zero Value
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: goroutine 82 [running]:
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: reflect.valueInterface(0x0, 0x0, 0x0, 0xc42035e501, 0xc42044b600, 0xc42044b600)
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/.goenv/versions/1.10.3/src/reflect/value.go:953 +0x1a3
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: reflect.Value.Interface(0x0, 0x0, 0x0, 0x0, 0x0)
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/.goenv/versions/1.10.3/src/reflect/value.go:948 +0x44
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: github.com/ashald/terraform-provider-yaml/yaml.serializeToFlowStyleYaml(0x0, 0x0, 0xc420362af0, 0xf, 0xc4203fb608, 0x0)
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/workspace/go/src/github.com/ashald/terraform-provider-yaml/yaml/common.go:32 +0x126
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: github.com/ashald/terraform-provider-yaml/yaml.readYamlMap(0xc4200ea230, 0x0, 0x0, 0xc4200ea230, 0x0)
2019-04-23T09:02:46.531-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/workspace/go/src/github.com/ashald/terraform-provider-yaml/yaml/data_source_yaml_map_of_strings.go:56 +0x424
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: github.com/ashald/terraform-provider-yaml/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).ReadDataApply(0xc420430310, 0xc42015cca0, 0x0, 0x0, 0xc420452b18, 0x10bce01, 0x1883060)
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/workspace/go/src/github.com/ashald/terraform-provider-yaml/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:290 +0x88
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: github.com/ashald/terraform-provider-yaml/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).ReadDataApply(0xc4204303f0, 0xc42035c140, 0xc42015cca0, 0x18, 0x18, 0xc42015cce0)
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/workspace/go/src/github.com/ashald/terraform-provider-yaml/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:426 +0x9a
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: github.com/ashald/terraform-provider-yaml/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).ReadDataApply(0xc42042c4e0, 0xc4200c62d0, 0xc4200c71b0, 0x0, 0x0)
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/workspace/go/src/github.com/ashald/terraform-provider-yaml/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:604 +0x4e
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: reflect.Value.call(0xc420350b40, 0xc42035e398, 0x13, 0x1a2627a, 0x4, 0xc4203a6f18, 0x3, 0x3, 0xc4200d2080, 0x0, ...)
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/.goenv/versions/1.10.3/src/reflect/value.go:447 +0x969
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: reflect.Value.Call(0xc420350b40, 0xc42035e398, 0x13, 0xc4204de718, 0x3, 0x3, 0x0, 0x0, 0x0)
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/.goenv/versions/1.10.3/src/reflect/value.go:308 +0xa4
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: net/rpc.(*service).call(0xc420368700, 0xc42035c2d0, 0xc420362368, 0xc420362380, 0xc420364e00, 0xc420360ba0, 0x1883020, 0xc4200c62d0, 0x16, 0x1883060, ...)
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/.goenv/versions/1.10.3/src/net/rpc/server.go:384 +0x14e
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: created by net/rpc.(*Server).ServeCodec
2019-04-23T09:02:46.532-0600 [DEBUG] plugin.terraform-provider-yaml_v2.0.0-darwin-amd64: 	/Users/ashald/.goenv/versions/1.10.3/src/net/rpc/server.go:480 +0x43a
2019/04/23 09:02:46 [ERROR] root: eval: *terraform.EvalReadDataApply, err: data.yaml_map_of_strings.normal: unexpected EOF
2019/04/23 09:02:46 [ERROR] root: eval: *terraform.EvalSequence, err: data.yaml_map_of_strings.normal: unexpected EOF
2019/04/23 09:02:46 [TRACE] [walkRefresh] Exiting eval tree: data.yaml_map_of_strings.normal
2019/04/23 09:02:46 [TRACE] dag/walk: upstream errored, not walking "output.normal"
2019/04/23 09:02:46 [TRACE] dag/walk: upstream errored, not walking "provider.yaml (close)"
2019/04/23 09:02:46 [TRACE] dag/walk: upstream errored, not walking "root"
2019-04-23T09:02:46.535-0600 [DEBUG] plugin: plugin process exited: path=/Users/markbordas/.terraform.d/plugins/terraform-provider-yaml_v2.0.0-darwin-amd64
2019/04/23 09:02:46 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-04-23T09:02:46.535-0600 [WARN ] plugin: error closing client during Kill: err="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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ashald
Copy link
Owner

ashald commented Apr 23, 2019

Could you check what version of the plugin do you use? It sounds similar to the issue that twas addressed in #3 so I'm wondering if it will work for you if you try 2.0.1 or above.

If that wouldn't help - would you be able to share the file you're trying to parse or at least a fragment of it that makes it fail?

I guess some better error logging wouldn't hurt the provider.

@mbordas09
Copy link
Author

I just tried 2.0.2 and the problem is fixed. I only found that version from following the link on the closed issue, so it would help to update the link on the main page. Thanks!

@ashald
Copy link
Owner

ashald commented Apr 23, 2019

Do you mean the link in this section https://github.com/ashald/terraform-provider-yaml#download ? Or some other link? If it's confusing I indeed should update it.

In general you check latest versions in the releases page https://github.com/ashald/terraform-provider-yaml/releases

P.S.: Glad it helped! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants