RukshanK
RukshanK

Reputation: 31

terraform-provider-bigip_v1.12.1 plugin crashed - panic: interface conversion: interface {} is nil, not string

Could someone please help me with this issue. I am deploying set of F5 load balancers using declarative onboarding through terraform. I have deployed the load balancers without any issues. But all of sudden when I try running terraform plan or apply it started crashing during the state refreshment for licensing module. Following is the error,

Error: Plugin did not respond │ │ with bigip_common_license_manage_bigiq.license_do_lbr01, │ on main.tf line 38, in resource "bigip_common_license_manage_bigiq" "license_do_lbr01": │ 38: resource "bigip_common_license_manage_bigiq" "license_do_lbr01" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details. ╵ ╷ │ Error: Plugin did not respond │ │ with bigip_common_license_manage_bigiq.license_do_lbr02, │ on main.tf line 48, in resource "bigip_common_license_manage_bigiq" "license_do_lbr02": │ 48: resource "bigip_common_license_manage_bigiq" "license_do_lbr02" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

This is the licensing module which was working as expected earlier,

'resource "bigip_common_license_manage_bigiq" "license_do_lbr01" {
  bigiq_address    = var.bigiq_hostname
  bigiq_user       = var.bigiq_username
  bigiq_password   = var.bigiq_password
  license_poolname = "GLOBAL-EVAL"
  assignment_type  = "MANAGED"
  provider         = bigip.lbr01
  depends_on       = [null_resource.bigip_adding_do_lbr01]
 }'

This is the error log that is displayed,

Stack trace from the terraform-provider-bigip_v1.12.1 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 41 [running]:
github.com/f5devcentral/go-bigip.(*BigIP).GetLicenseStatus(0xc000358a10, 0xc0000381e0, 0x24, 0xc000038300, 0x24, 0x0)
        github.com/f5devcentral/[email protected]/bigiq.go:158 +0x3f9
github.com/F5Networks/terraform-provider-bigip/bigip.resourceBigiqLicenseManageRead(0xc000358690, 0x1025100, 0xc0003580e0, 0xc000358690, 0x0)
        github.com/F5Networks/terraform-provider-bigip/bigip/resource_bigiq_regkey_license_manage.go:268 +0x465
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0005ee400, 0xc00033e640, 0x1025100, 0xc0003580e0, 0xc0000a42b0, 0x0, 0x0)        github.com/hashicorp/[email protected]/helper/schema/resource.go:455 +0x12e
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc00012aa18, 0x11b8c30, 0xc0004ee6f0, 0xc00033e460, 0xc00012aa18, 0xc0004ee6f0, 0xc00064ca50)
        github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:525 +0x3dd
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0xfe3f80, 0xc00012aa18, 0x11b8c30, 0xc0004ee6f0, 0xc00012c840, 0x0, 0x11b8c30, 0xc0004ee6f0, 0xc0006e8000, 0x17d)
        github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3153 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00015e160, 0x11c13d8, 0xc00012f980, 0xc0004b1500, 0xc00009c540, 0x171dc70, 0x0, 0x0, 0x0)
        google.golang.org/[email protected]/server.go:995 +0x482
google.golang.org/grpc.(*Server).handleStream(0xc00015e160, 0x11c13d8, 0xc00012f980, 0xc0004b1500, 0x0)
        google.golang.org/[email protected]/server.go:1275 +0xd2c
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0003fc240, 0xc00015e160, 0x11c13d8, 0xc00012f980, 0xc0004b1500)
        google.golang.org/[email protected]/server.go:710 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:708 +0xa5
panic: interface conversion: interface {} is nil, not string

goroutine 41 [running]:
github.com/f5devcentral/go-bigip.(*BigIP).GetLicenseStatus(0xc0005928c0, 0xc0000a4180, 0x24, 0xc0001f48a0, 0x24, 0x0)
        github.com/f5devcentral/[email protected]/bigiq.go:158 +0x3f9
github.com/F5Networks/terraform-provider-bigip/bigip.resourceBigiqLicenseManageRead(0xc000592540, 0x1025100, 0xc00063c150, 0xc000592540, 0x0)
        github.com/F5Networks/terraform-provider-bigip/bigip/resource_bigiq_regkey_license_manage.go:268 +0x465
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000504400, 0xc0005823c0, 0x1025100, 0xc00063c150, 0xc0000ac2b8, 0x0, 0x0)        github.com/hashicorp/[email protected]/helper/schema/resource.go:455 +0x12e
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc0004881c8, 0x11b8c30, 0xc0001ea810, 0xc0005821e0, 0xc0004881c8, 0xc0001ea810, 0xc000561a50)
        github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:525 +0x3dd
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0xfe3f80, 0xc0004881c8, 0x11b8c30, 0xc0001ea810, 0xc000400b40, 0x0, 0x11b8c30, 0xc0001ea810, 0xc0000e8480, 0x17d)
        github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3153 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000142160, 0x11c13d8, 0xc000001e00, 0xc0000b0200, 0xc0003bf110, 0x171dc70, 0x0, 0x0, 0x0)
        google.golang.org/[email protected]/server.go:995 +0x482
google.golang.org/grpc.(*Server).handleStream(0xc000142160, 0x11c13d8, 0xc000001e00, 0xc0000b0200, 0x0)
        google.golang.org/[email protected]/server.go:1275 +0xd2c
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0003ce1e0, 0xc000142160, 0x11c13d8, 0xc000001e00, 0xc0000b0200)
        google.golang.org/[email protected]/server.go:710 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:708 +0xa5

Error: The terraform-provider-bigip_v1.12.1 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely helpful if you could report the crash with the plugin's maintainers so that it can be fixed. The output above should help diagnose the issue.

Could someone please help me to sort this out ?

Upvotes: 0

Views: 618

Answers (1)

RukshanK
RukshanK

Reputation: 31

It seems this issue is not related to a bug in the terraform plugin, rather a connectivity issue with the BigIQ device. Once the connectivity issue is sorted the issue got resolved.

Upvotes: 0

Related Questions