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

Crash modifying monitor_group #84

Closed
niksoper opened this issue Jun 24, 2022 · 4 comments
Closed

Crash modifying monitor_group #84

niksoper opened this issue Jun 24, 2022 · 4 comments
Assignees

Comments

@niksoper
Copy link

I've got a site24x7_monitor_group which creates fine but a subsequent apply causes this crash:

site24x7_monitor_group.this: Modifying... [id=26877000000106001]
╷
│ Error: Plugin did not respond
│
│   with site24x7_monitor_group.this,
│   on main.tf line 1, in resource "site24x7_monitor_group" "this":
│    1: resource "site24x7_monitor_group" "this" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵

Stack trace from the terraform-provider-site24x7_v1.0.16 plugin:

panic: interface conversion: interface {} is *schema.Set, not []interface {}

goroutine 66 [running]:
github.com/site24x7/terraform-provider-site24x7/site24x7.resourceDataToMonitorGroupUpdate(0x1400017cbd0, 0x14000892400, 0x11)
	github.com/site24x7/terraform-provider-site24x7/site24x7/monitor_group.go:208 +0x7a4
github.com/site24x7/terraform-provider-site24x7/site24x7.monitorGroupUpdate(0x1400017cbd0, 0x102ea7c40, 0x14000636e30, 0x24, 0x1033f6760)
	github.com/site24x7/terraform-provider-site24x7/site24x7/monitor_group.go:101 +0xcc
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0x14000299080, 0x1400013c500, 0x14000297ee0, 0x102ea7c40, 0x14000636e30, 0x102dca801, 0x1400012f908, 0x1400013bc50)
	github.com/hashicorp/terraform-plugin-sdk@v1.1.1/helper/schema/resource.go:311 +0x1d4
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0x14000299800, 0x1400012f8d0, 0x1400013c500, 0x14000297ee0, 0x1400020e3e8, 0x140001a63a0, 0x102dcc4e0)
	github.com/hashicorp/terraform-plugin-sdk@v1.1.1/helper/schema/provider.go:294 +0x88
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0x140002904e8, 0x102efa6b0, 0x1400013ae10, 0x14000388300, 0x140002904e8, 0x10280c618, 0x102e62a40)
	github.com/hashicorp/terraform-plugin-sdk@v1.1.1/internal/helper/plugin/grpc_provider.go:885 +0x6b0
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x102e9e760, 0x140002904e8, 0x102efa6b0, 0x1400013ae10, 0x140003882a0, 0x0, 0x102efa6b0, 0x1400013ae10, 0x14000178240, 0x220)
	github.com/hashicorp/terraform-plugin-sdk@v1.1.1/internal/tfplugin5/tfplugin5.pb.go:3189 +0x1c8
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000406000, 0x102f02cd8, 0x14000103800, 0x14000144100, 0x140007143c0, 0x1033b8260, 0x0, 0x0, 0x0)
	google.golang.org/grpc@v1.23.0/server.go:995 +0x380
google.golang.org/grpc.(*Server).handleStream(0x14000406000, 0x102f02cd8, 0x14000103800, 0x14000144100, 0x0)
	google.golang.org/grpc@v1.23.0/server.go:1275 +0xab0
google.golang.org/grpc.(*Server).serveStreams.func1.1(0x140005866f0, 0x14000406000, 0x102f02cd8, 0x14000103800, 0x14000144100)
	google.golang.org/grpc@v1.23.0/server.go:710 +0x94
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/grpc@v1.23.0/server.go:708 +0x8c

Error: The terraform-provider-site24x7_v1.0.16 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.

I'm using these versions:

  • terraform: 1.0.11
  • terragrunt: 0.38.1
  • site24x7 provider: 1.0.16

The module is extremely simple:

resource "site24x7_monitor_group" "this" {
  display_name = var.display_name
  description     = var.description

  health_threshold_count = var.health_threshold_count
}

Incidentally, I'm also setting health_threshold_count to 0 but the subsequent plan looks like this:

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # site24x7_monitor_group.this will be updated in-place
  ~ resource "site24x7_monitor_group" "this" {
      ~ health_threshold_count = 1 -> 0
        id                     = "26877000000106001"
        # (4 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
@niksoper
Copy link
Author

I thought this might have been a Mac M1 issue but I've tested on two different machines and I get the same error:

  • Mac, Apple M1 Pro, Monterey 12.1
  • Mac, 2.9GHz Quad-Core Intel Core i7, Big Sur 11.6

@niksoper
Copy link
Author

And same results with the latest terraform version 1.2.3.

@jim-billy-zoho jim-billy-zoho self-assigned this Jun 27, 2022
@jim-billy-zoho
Copy link
Collaborator

@niksoper Thanks for raising this issue. We have fixed it now in version 1.0.17.

@niksoper
Copy link
Author

Thanks for sorting this out so quickly - I've already upgraded 🤓

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