-
Notifications
You must be signed in to change notification settings - Fork 212
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
[Bug]: The terraform-provider-pagerduty_v3.14.4 plugin crashed! #910
Comments
vividly789
changed the title
Error: The terraform-provider-pagerduty_v3.14.4 plugin crashed!
[Bug]: The terraform-provider-pagerduty_v3.14.4 plugin crashed!
Jul 17, 2024
Facing similar error when attempting to update Terraform Plan
Terraform will perform the following actions:
# module.pagerduty.pagerduty_escalation_policy.team_oncall_escalation_policy[0] will be updated in-place
! resource "pagerduty_escalation_policy" "team_oncall_escalation_policy" {
id = "<redacted>"
name = "team-<redacted> Escalation Policy"
# (3 unchanged attributes hidden)
! rule {
! escalation_delay_in_minutes = 60 -> 5
id = "<redacted>"
! target {
! id = "<redacted>" -> "<redacted>"
# (1 unchanged attribute hidden)
}
# (1 unchanged block hidden)
}
! rule {
! escalation_delay_in_minutes = 15 -> 5
id = "<redacted>"
! target {
! id = "<redacted>" -> "<redacted>"
# (1 unchanged attribute hidden)
}
# (1 unchanged block hidden)
}
+ rule {
+ escalation_delay_in_minutes = 60
+ escalation_rule_assignment_strategy (known after apply)
+ target {
+ id = "<redacted>"
+ type = "schedule_reference"
}
}
+ rule {
+ escalation_delay_in_minutes = 15
+ escalation_rule_assignment_strategy (known after apply)
+ target {
+ id = "<redacted>"
+ type = "schedule_reference"
}
}
}
Plan: 0 to add, 1 to change, 0 to destroy. Logs
module.pagerduty.pagerduty_escalation_policy.team_oncall_escalation_policy[0]: Modifying... [id=<redacted>]
╷
│ Error: Plugin did not respond
│
│ with module.pagerduty.pagerduty_escalation_policy.team_oncall_escalation_policy[0],
│ on ../../../modules/pd-on-call-team/escalation_policy.tf line 1, in resource "pagerduty_escalation_policy" "team_oncall_escalation_policy":
│ 1: resource "pagerduty_escalation_policy" "team_oncall_escalation_policy" {
│
│ 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-pagerduty_v3.11.4 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8ebc48]
goroutine 24 [running]:
github.com/PagerDuty/terraform-provider-pagerduty/pagerduty.resourcePagerDutyEscalationPolicyUpdate(0x4000773380, {0xa701c0?, 0x400071da40?})
github.com/PagerDuty/terraform-provider-pagerduty/pagerduty/resource_pagerduty_escalation_policy.go:248 +0x328
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xe5a660?, {0xe5a660?, 0x4000759080?}, 0xd?, {0xa701c0?, 0x400071da40?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/resource.go:800 +0x134
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x400032e0e0, {0xe5a660, 0x4000759080}, 0x40002a8b60, 0x4000773200, {0xa701c0, 0x400071da40})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/resource.go:919 +0x670
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x400000d998, {0xe5a660?, 0x4000758f60?}, 0x400075a370)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/grpc_provider.go:1074 +0xb5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xe5a5b8?, {0xe5a660?, 0x4000758c30?}, 0x400075a370)
github.com/hashicorp/terraform-plugin-mux@v0.13.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x4000366140, {0xe5a660?, 0x4000758240?}, 0x40001ec000)
github.com/hashicorp/terraform-plugin-go@v0.20.0/tfprotov5/tf5server/server.go:859 +0x3b8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xb88840?, 0x4000366140}, {0xe5a660, 0x4000758240}, 0x4000772000, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.20.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:503 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x40000c1a00, {0xe5a660, 0x40007581b0}, {0xe5fa98, 0x400043e000}, 0x4000760000, 0x400040e120, 0x150cbd8, 0x0)
google.golang.org/grpc@v1.60.1/server.go:1372 +0xbec
google.golang.org/grpc.(*Server).handleStream(0x40000c1a00, {0xe5fa98, 0x400043e000}, 0x4000760000)
google.golang.org/grpc@v1.60.1/server.go:1783 +0xc7c
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.60.1/server.go:1016 +0x5c
created by google.golang.org/grpc.(*Server).serveStreams.func2
google.golang.org/grpc@v1.60.1/server.go:1027 +0x144
Error: The terraform-provider-pagerduty_v3.11.4 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. @cjgajard, can we kindly prioritise this? :) Would love to help you guys test it or provide more feedback. |
Any update on this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Stack trace from the
terraform-provider-pagerduty_v3.14.4
plugin:It looks like the provider is crashing here, while attempting to process the
name
attribute for thepagerduty_service
resource:d.Set("name", service.Name)
FWIW, it doesn't look from the Terraform plan like Terraform would have been trying to update the
name
attribute for the apply(checked the terraform plan for both failure one and successful one)Debug Output
Below is a link to snippet of the last HTTP request the provider made before the crash:
https://gist.github.com/vividly789/46b96d4e28ef562f1812ca60fcd341f7
Looking in the debug log, I think this could have been caused by a PagerDuty API issue!
But its worth erroring out more gracefully if the API returns an error that the provider handle, without crashing.
Panic Output
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xd8 pc=0xe96f76]
Expected Behavior
Expect resource to be created during Terraform apply
Actual Behavior
I confirmed that terraform apply fails with the following message.
Steps to Reproduce
This appears to be an arbitrary error that only occurs sometimes when running terraform.
The text was updated successfully, but these errors were encountered: