hashicorp/terraform-provider-infoblox

Terraform crash when creating infoblox_ip_association

Closed this issue · 5 comments

I get a repeatable Terraform crash after deploying a Windows VMware VM when Terraform runs the infoblox_ip_association code. RHEL VMs work fine.

What do I need to do for this to work? We are stuck.

Error:
vsphere_virtual_machine.vm: Creation complete after 11m19s [id=420e0810-7250-155e-5f45-ad18d5dcf9c2]
infoblox_ip_association.windows: Creating...

Error: rpc error: code = Unavailable desc = transport is closing

panic: runtime error: invalid memory address or nil pointer dereference
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: [signal 0xc0000005 code=0x0 addr=0x38 pc=0xe28957]
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe:
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: goroutine 163 [running]:
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: github.com/terraform-providers/terraform-provider-infoblox/infoblox.Resource(0xc0002b4770, 0xfc3560, 0xc00029a360, 0x1, 0x1)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/infoblox/resource_infoblox_ip_association.go:193 +0x957
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: github.com/terraform-providers/terraform-provider-infoblox/infoblox.resourceIPAssociationCreate(0xc0002b4770, 0xfc3560, 0xc00029a360, 0x2, 0x1a75c20)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/infoblox/resource_infoblox_ip_association.go:77 +0xcf
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc000148a80, 0xc000130fa0, 0xc0005626a0, 0xfc3560, 0xc00029a360, 0xc000478801, 0xc0000fdd70, 0xc000478978)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:305 +0x36c
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc000148d00, 0xc0001518e0, 0xc000130fa0, 0xc0005626a0, 0xc0000bce08, 0xc000112108, 0xf303a0)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:289 +0xa0
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: github.com/hashicorp/terraform/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc0001124b0, 0x12ff7a0, 0xc0000fd200, 0xc00010a2a0, 0xc0001124b0, 0xc0000fd200, 0xc00038ba58)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go:885 +0x899
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: github.com/hashicorp/terraform/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x106a180, 0xc0001124b0, 0x12ff7a0, 0xc0000fd200, 0xc000130730, 0x0, 0x12ff7a0, 0xc0000fd200, 0xc0001c66c0, 0x202)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go:3189 +0x21e
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000077380, 0x130ca40, 0xc000290900, 0xc000154000, 0xc00010cdb0, 0x1a47f00, 0x0, 0x0, 0x0)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:998 +0x471
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: google.golang.org/grpc.(*Server).handleStream(0xc000077380, 0x130ca40, 0xc000290900, 0xc000154000, 0x0)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:1278 +0xd9e
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0001241b0, 0xc000077380, 0x130ca40, 0xc000290900, 0xc000154000)
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:717 +0xc2
2020-10-01T15:06:30.753-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-10-01T15:06:30.754-0700 [DEBUG] plugin.terraform-provider-infoblox_v1.1.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:715 +0xa8
2020/10/01 15:06:30 [DEBUG] infoblox_ip_association.windows: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalMaybeTainted
2020/10/01 15:06:30 [TRACE] EvalMaybeTainted: infoblox_ip_association.windows encountered an error during creation, so it is now marked as tainted
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalWriteState
2020/10/01 15:06:30 [TRACE] EvalWriteState: removing state object for infoblox_ip_association.windows
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalApplyProvisioners
2020/10/01 15:06:30 [TRACE] EvalApplyProvisioners: infoblox_ip_association.windows has no state, so skipping provisioners
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalMaybeTainted
2020/10/01 15:06:30 [TRACE] EvalMaybeTainted: infoblox_ip_association.windows encountered an error during creation, so it is now marked as tainted
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalWriteState
2020/10/01 15:06:30 [TRACE] EvalWriteState: removing state object for infoblox_ip_association.windows
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalIf
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalIf
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalWriteDiff
2020/10/01 15:06:30 [TRACE] eval: *terraform.EvalApplyPost
2020/10/01 15:06:30 [ERROR] eval: *terraform.EvalApplyPost, err: rpc error: code = Unavailable desc = transport is closing
2020/10/01 15:06:30 [ERROR] eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/10/01 15:06:30 [TRACE] [walkApply] Exiting eval tree: infoblox_ip_association.windows
2020/10/01 15:06:30 [TRACE] vertex "infoblox_ip_association.windows": visit complete
2020/10/01 15:06:30 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2020/10/01 15:06:30 [TRACE] dag/walk: upstream of "provider["registry.terraform.io/terraform-providers/infoblox"] (close)" errored, so skipping
2020/10/01 15:06:30 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020/10/01 15:06:30 [TRACE] statemgr.Filesystem: no original state snapshot to back up
2020/10/01 15:06:30 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 3
2020/10/01 15:06:30 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2020/10/01 15:06:30 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2020/10/01 15:06:30 [TRACE] statemgr.Filesystem: unlocked by closing terraform.tfstate
2020-10-01T15:06:30.762-0700 [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/terraform-providers/infoblox/1.1.0/windows_amd64/terraform-provider-infoblox_v1.1.0_x4.exe pid=18712 error="exit status 2"
2020-10-01T15:06:30.762-0700 [DEBUG] plugin: plugin exited

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

SECURITY WARNING: the "crash.log" file that was created may contain
sensitive information that must be redacted before it is safe to share
on the issue tracker.

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
crash.log

Seeing same issue; any update on this?

infoblox_ip_association needs to have MAC address added. Suggest you to use ip_allocation first and then association to update the parameters. Would help if can see the terraform file.

This is what I'm running to test basic functionality:
Windows - github.tf.txt
Infoblox - gibhub.tf.txt

`provider "infoblox"{
version="~> 1.0"
username="user"
password=""
server="
**"
}
data "infoblox_network" "demo_network" {
network_view_name = "default"
tenant_id = "ACY"
cidr = "172.26.31.0/26"
}
resource "infoblox_ip_allocation" "windows"{
network_view_name="default"
vm_name="IACTDCTVAP153"
dns_view="Internal DNS"
zone="terraform.faa.gov"
cidr=data.infoblox_network.demo_network.cidr
tenant_id="ACY"
}
resource "infoblox_ip_association" "windows"{
network_view_name="default"
vm_name = infoblox_ip_allocation.windows.vm_name
cidr = data.infoblox_network.demo_network.cidr
mac_addr =vsphere_virtual_machine.vm.network_interface.0.mac_address
ip_addr=infoblox_ip_allocation.windows.ip_addr
vm_id =vsphere_virtual_machine.vm.id
tenant_id="ACY"
dns_view="Internal DNS"
zone="terraform.faa.gov"
}

`

Attached is the associated VMware .tf file we are testing with. In the "clone" section, the published example for "ipv4_gateway" does not work either: ipv4_gateway = data.infoblox_network.demo_network.gateway. We also could not find a published list of Attributes for the Data codeblocks.

Appreciate any help.

Fixed with PR #33

Thank you!