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

[Bug]: Create ip_set finish with crash plugin #818

Closed
o-presentini opened this issue Nov 12, 2024 · 0 comments · Fixed by #823
Closed

[Bug]: Create ip_set finish with crash plugin #818

o-presentini opened this issue Nov 12, 2024 · 0 comments · Fixed by #823
Assignees
Labels
bug Something isn't working community

Comments

@o-presentini
Copy link

Terraform Core Version

1.5.7

Cloud Avenue Provider Version

0.20.3

Affected Resource(s)

cloudavenue_edgegateway_ip_set

Expected Behavior

Creating ip set without errors

Actual Behavior

IP was set but finish with a crash log

Relevant Error/Panic Output Snippet

cloudavenue_edgegateway_ip_set.main["local [terraform]"]: Creating...
cloudavenue_edgegateway_ip_set.main["local [terraform]"]: Still creating... [10s elapsed]
╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin6.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵

Stack trace from the terraform-provider-cloudavenue_v0.20.3 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1232dca]

goroutine 14 [running]:
github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/provider/edgegw.(*ipSetResource).read(0xc000594bd0, {0x1b632e8, 0xc000594a80}, 0xc000b7e790)
        github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/provider/edgegw/ip_set_resource.go:420 +0x38a
github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/provider/edgegw.(*ipSetResource).Create(0xc000594bd0, {0x1b632e8, 0xc000594a80}, {{{{0x1b70e50, 0xc000595ad0}, {0x15ac800, 0xc0005957a0}}, {0x1b74558, 0xc0006db4f0}}, {{{0x1b70e50, ...}, ...}, ...}, ...}, ...)
        github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/provider/edgegw/ip_set_resource.go:151 +0x795
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).CreateResource(0xc000570488, {0x1b632e8, 0xc000594a80}, 0xc00060b550, 0xc00060b528)
        github.com/hashicorp/terraform-plugin-framework@v1.13.0/internal/fwserver/server_createresource.go:101 +0x578
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ApplyResourceChange(0xc000570488, {0x1b632e8, 0xc000594a80}, 0xc000680230, 0xc00060b640)
        github.com/hashicorp/terraform-plugin-framework@v1.13.0/internal/fwserver/server_applyresourcechange.go:57 +0x4aa
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ApplyResourceChange(0xc000570488, {0x1b632e8?, 0xc0005948d0?}, 0xc000680190)
        github.com/hashicorp/terraform-plugin-framework@v1.13.0/internal/proto6server/server_applyresourcechange.go:55 +0x38e
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ApplyResourceChange(0xc00014e140, {0x1b632e8?, 0xc00086db30?}, 0xc0004243f0)
        github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov6/tf6server/server.go:865 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ApplyResourceChange_Handler({0x1784080, 0xc00014e140}, {0x1b632e8, 0xc00086db30}, 0xc0000f1780, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:611 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000156800, {0x1b632e8, 0xc00086daa0}, {0x1b726e0, 0xc000572340}, 0xc000679e60, 0xc000594120, 0x2809d58, 0x0)
        google.golang.org/grpc@v1.67.1/server.go:1394 +0xe2b
google.golang.org/grpc.(*Server).handleStream(0xc000156800, {0x1b726e0, 0xc000572340}, 0xc000679e60)
        google.golang.org/grpc@v1.67.1/server.go:1805 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.67.1/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 31
        google.golang.org/grpc@v1.67.1/server.go:1040 +0x125

Error: The terraform-provider-cloudavenue_v0.20.3 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.
Time took: 27s

Terraform Configuration Files

resource "cloudavenue_edgegateway_ip_set" "main" {
  for_each = { for k, range in var.ip_set : range.name => range }
  name        = each.value.name
  ip_addresses = each.value.ip_range
  edge_gateway_id = var.edge_gateway_id
}

variable "ip_set" {
  type = list(object({
    name = string
    ip_range = list(string)
  }))
  default = []
}

ip_set = [
  {
    name = "local [terraform]"
    ip_range = ["192.168.0.0/16"]
  }
]

Steps to Reproduce

  1. Edge gateway defined
  2. Try to create the ip set

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@o-presentini o-presentini added the bug Something isn't working label Nov 12, 2024
@azrod azrod self-assigned this Nov 18, 2024
@azrod azrod linked a pull request Nov 18, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community
Projects
None yet
3 participants