infobloxopen / terraform-provider-infoblox

Infoblox NIOS Terraform Provider
https://github.com/infobloxopen/terraform-provider-infoblox
Mozilla Public License 2.0
68 stars 77 forks source link

infoblox_ip_association causing crash #49

Closed scumola closed 4 years ago

scumola commented 4 years ago

An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols:

Terraform will perform the following actions:

infoblox_ip_association.demo_associate will be created

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve.

Enter a value: yes

infoblox_ip_association.demo_associate: Creating...

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

panic: runtime error: invalid memory address or nil pointer dereference 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x1a18d98] 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: goroutine 42 [running]: 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: github.com/infobloxopen/terraform-provider-infoblox/infoblox.Resource(0xc0002bc4d0, 0x1bb6b20, 0xc0003aeea0, 0x1, 0x1) 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/infoblox/resourceIPAssociation.go:189 +0x618 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: github.com/infobloxopen/terraform-provider-infoblox/infoblox.resourceIPAssociationCreate(0xc0002bc4d0, 0x1bb6b20, 0xc0003aeea0, 0x2, 0x2671d80) 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/infoblox/resourceIPAssociation.go:86 +0xc8 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: github.com/hashicorp/terraform/helper/schema.(Resource).Apply(0xc00018aa80, 0xc0000d8870, 0xc0000d2d40, 0x1bb6b20, 0xc0003aeea0, 0xc0003add01, 0xc00014b5f0, 0xc0003addf0) 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:305 +0x365 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: github.com/hashicorp/terraform/helper/schema.(Provider).Apply(0xc00018ac80, 0xc0002538e0, 0xc0000d8870, 0xc0000d2d40, 0xc0002423e8, 0xc000156070, 0x1b21480) 2020-01-06T11:48:16.683-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:289 +0x99 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: github.com/hashicorp/terraform/helper/plugin.(GRPCProviderServer).ApplyResourceChange(0xc0001564b0, 0x1ef6200, 0xc00014a990, 0xc0001bc060, 0xc0001564b0, 0xc00014a990, 0xc00019ca58) 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go:885 +0x892 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: github.com/hashicorp/terraform/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x1c5dfa0, 0xc0001564b0, 0x1ef6200, 0xc00014a990, 0xc0000d85a0, 0x0, 0x1ef6200, 0xc00014a990, 0xc000220600, 0x177) 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go:3189 +0x217 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: google.golang.org/grpc.(Server).processUnaryRPC(0xc0004f0900, 0x1f02ee0, 0xc0004f1980, 0xc000202000, 0xc00014a630, 0x26463c0, 0x0, 0x0, 0x0) 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:998 +0x46a 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: google.golang.org/grpc.(Server).handleStream(0xc0004f0900, 0x1f02ee0, 0xc0004f1980, 0xc000202000, 0x0) 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:1278 +0xd97 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: google.golang.org/grpc.(Server).serveStreams.func1.1(0xc00015c170, 0xc0004f0900, 0x1f02ee0, 0xc0004f1980, 0xc000202000) 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:717 +0xbb 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: created by google.golang.org/grpc.(Server).serveStreams.func1 2020-01-06T11:48:16.684-0700 [DEBUG] plugin.terraform-provider-infoblox: /Users/swebb/work/terraform-provider-infoblox/vendor/google.golang.org/grpc/server.go:715 +0xa1 2020/01/06 11:48:16 [DEBUG] infoblox_ip_association.demo_associate: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalMaybeTainted 2020/01/06 11:48:16 [TRACE] EvalMaybeTainted: infoblox_ip_association.demo_associate encountered an error during creation, so it is now marked as tainted 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalWriteState 2020/01/06 11:48:16 [TRACE] EvalWriteState: removing state object for infoblox_ip_association.demo_associate 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalApplyProvisioners 2020/01/06 11:48:16 [TRACE] EvalApplyProvisioners: infoblox_ip_association.demo_associate has no state, so skipping provisioners 2020-01-06T11:48:16.687-0700 [DEBUG] plugin: plugin process exited: path=/Users/swebb/.terraform.d/plugins/terraform-provider-infoblox pid=23231 error="exit status 2" 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalMaybeTainted 2020/01/06 11:48:16 [TRACE] EvalMaybeTainted: infoblox_ip_association.demo_associate encountered an error during creation, so it is now marked as tainted 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalWriteState 2020/01/06 11:48:16 [TRACE] EvalWriteState: removing state object for infoblox_ip_association.demo_associate 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalIf 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalIf 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalWriteDiff 2020/01/06 11:48:16 [TRACE] : eval: terraform.EvalApplyPost 2020/01/06 11:48:16 [ERROR] : eval: terraform.EvalApplyPost, err: rpc error: code = Unavailable desc = transport is closing 2020/01/06 11:48:16 [ERROR] : eval: terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing 2020/01/06 11:48:16 [TRACE] [walkApply] Exiting eval tree: infoblox_ip_association.demo_associate 2020/01/06 11:48:16 [TRACE] vertex "infoblox_ip_association.demo_associate": visit complete 2020/01/06 11:48:16 [TRACE] dag/walk: upstream of "provider.infoblox (close)" errored, so skipping 2020/01/06 11:48:16 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping 2020/01/06 11:48:16 [TRACE] dag/walk: upstream of "root" errored, so skipping 2020/01/06 11:48:16 [TRACE] statemgr.Filesystem: creating backup snapshot at terraform.tfstate.backup 2020/01/06 11:48:16 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 206 2020/01/06 11:48:16 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate 2020/01/06 11:48:16 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info 2020/01/06 11:48:16 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock 2020-01-06T11:48:16.718-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.

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

$


terraform stanza that caused this issue:

resource "infoblox_ip_association" "demo_associate"{
  vm_name="test01"
  cidr="10.120.0.0/13"
  ip_addr = aws_instance.test01.private_ip
  vm_id = aws_instance.test01.id
  tenant_id="domain.com"
}
saiprasannasastry commented 4 years ago

This might be because of #48

saiprasannasastry commented 4 years ago

Is it the only resource block you are using? if not can i get your complete .tf file ?

scumola commented 4 years ago

In this case, I use the provider block for login, then this one. No other infoblox-type blocks are in use.

saiprasannasastry commented 4 years ago

Please use the ip_allocation resource then, resource IP association block was created for the sole reason to update the properties of VM, if integrated with other cloud's , other than that both the blocks are similar