Skip to content

Instantly share code, notes, and snippets.

@dataclouder
Created May 2, 2019 07:33
Show Gist options
  • Save dataclouder/aefbd7ae4a86bbb8ebb38aee25687dfd to your computer and use it in GitHub Desktop.
Save dataclouder/aefbd7ae4a86bbb8ebb38aee25687dfd to your computer and use it in GitHub Desktop.
debug incorrect vdc name
$ terraform apply -auto-approve
vcd_network_routed.net-govcd: Refreshing state... (ID: net-govcd)
vcd_catalog.cat-govcd: Refreshing state... (ID: cat-govcd)
vcd_catalog_item.photon-hw11: Refreshing state... (ID: cat-govcd:photon-hw11)
vcd_network_routed.net-govcd: Destroying... (ID: net-govcd)
vcd_network_routed.second-net-govcd: Creating...
dns1: "" => "8.8.8.8"
dns2: "" => "8.8.4.4"
edge_gateway: "" => "egw-govcd"
gateway: "" => "192.168.2.1"
href: "" => "<computed>"
name: "" => "second-net-govcd"
netmask: "" => "255.255.255.0"
org: "" => "govcd"
shared: "" => "false"
static_ip_pool.#: "" => "1"
static_ip_pool.554201241.end_address: "" => "192.168.2.100"
static_ip_pool.554201241.start_address: "" => "192.168.2.2"
vdc: "" => "wrong-vdc-govcd"
vcd_network_routed.net-govcd: Still destroying... (ID: net-govcd, 10s elapsed)
vcd_network_routed.second-net-govcd: Still creating... (10s elapsed)
vcd_network_routed.net-govcd: Destruction complete after 16s
Error: Error applying plan:
1 error(s) occurred:
* vcd_network_routed.second-net-govcd: 1 error(s) occurred:
* vcd_network_routed.second-net-govcd: 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: runtime error: invalid memory address or nil pointer dereference
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x184e50d]
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4:
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: goroutine 90 [running]:
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/vmware/go-vcloud-director/v2/govcd.(*Vdc).Refresh(0xc000128b40, 0xc0003c8e00, 0x1c0e340)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/vmware/go-vcloud-director/v2/govcd/vdc.go:123 +0x3d
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/vmware/go-vcloud-director/v2/govcd.(*Vdc).FindEdgeGateway(0xc000128b40, 0xc0003caf90, 0x9, 0x1926180, 0xc0003c8e00, 0x1, 0x0)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/vmware/go-vcloud-director/v2/govcd/vdc.go:265 +0x43
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: github.com/terraform-providers/terraform-provider-vcd/vcd.resourceVcdNetworkRoutedCreate(0xc0001c3c70, 0x1a4a320, 0xc00040d0e0, 0x0, 0x0)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-vcd/vcd/resource_vcd_network_routed.go:163 +0x273
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc00026c2a0, 0xc00048c870, 0xc000495420, 0x1a4a320, 0xc00040d0e0, 0x100b601, 0xc0003a1b80, 0x10bd2cc)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:225 +0x351
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc00026cd20, 0xc00048c820, 0xc00048c870, 0xc000495420, 0xc000076800, 0xc0003a1b48, 0x2700d80)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:283 +0x9c
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc0003d4140, 0xc0004953c0, 0xc0005350c0, 0x0, 0x0)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-vcd/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:527 +0x57
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: reflect.Value.call(0xc000144d20, 0xc000158cd8, 0x13, 0x1a9bdc1, 0x4, 0xc0003a1f18, 0x3, 0x3, 0xc00051c240, 0xc00001bc80, ...)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/goenv/versions/1.11.5/src/reflect/value.go:447 +0x454
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: reflect.Value.Call(0xc000144d20, 0xc000158cd8, 0x13, 0xc0004c2f18, 0x3, 0x3, 0x29, 0xc00014e960, 0xc00013ede0)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/goenv/versions/1.11.5/src/reflect/value.go:308 +0xa4
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: net/rpc.(*service).call(0xc00001a9c0, 0xc00040cff0, 0xc0004a38c0, 0xc0004a38d0, 0xc00016c900, 0xc000529460, 0x18faf60, 0xc0004953c0, 0x16, 0x18fafa0, ...)
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/goenv/versions/1.11.5/src/net/rpc/server.go:384 +0x14e
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: created by net/rpc.(*Server).ServeCodec
2019-05-02T09:20:58.218+0200 [DEBUG] plugin.terraform-provider-vcd_v2.1.0_x4: /opt/goenv/versions/1.11.5/src/net/rpc/server.go:481 +0x47e
2019/05/02 09:20:58 [TRACE] root: eval: *terraform.EvalWriteState
2019/05/02 09:20:58 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2019/05/02 09:20:58 [TRACE] root: eval: *terraform.EvalIf
2019/05/02 09:20:58 [TRACE] root: eval: *terraform.EvalWriteState
2019/05/02 09:20:58 [TRACE] root: eval: *terraform.EvalWriteDiff
2019/05/02 09:20:58 [TRACE] root: eval: *terraform.EvalApplyPost
2019/05/02 09:20:58 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:
* vcd_network_routed.second-net-govcd: unexpected EOF
2019/05/02 09:20:58 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
* vcd_network_routed.second-net-govcd: unexpected EOF
2019/05/02 09:20:58 [TRACE] [walkApply] Exiting eval tree: vcd_network_routed.second-net-govcd
2019/05/02 09:20:58 [TRACE] dag/walk: upstream errored, not walking "provider.vcd (close)"
2019/05/02 09:20:58 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2019/05/02 09:20:58 [TRACE] dag/walk: upstream errored, not walking "root"
2019-05-02T09:20:58.219+0200 [DEBUG] plugin: plugin process exited: path=$PWD/.terraform/plugins/darwin_amd64/terraform-provider-vcd_v2.1.0_x4
2019/05/02 09:20:58 [TRACE] Preserving existing state lineage "11177338-4f7c-9f2f-f9cb-92b294174dca"
2019/05/02 09:20:58 [TRACE] Preserving existing state lineage "11177338-4f7c-9f2f-f9cb-92b294174dca"
2019/05/02 09:20:58 [TRACE] Preserving existing state lineage "11177338-4f7c-9f2f-f9cb-92b294174dca"
2019/05/02 09:20:58 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-05-02T09:20:58.240+0200 [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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment