terraform-provider-yandex
terraform-provider-yandex copied to clipboard
A runtime error occurs during OpenSearch cluster deployment
looks like this error still here for arm64
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x105987544]
goroutine 138 [running]:
github.com/yandex-cloud/terraform-provider-yandex/yandex.opensearchNodeGroupsDiffCustomize({0x106702700?, 0x140012fe3c0?}, 0x105bc59d8?, {0xd?, 0x105bcd255?})
github.com/yandex-cloud/terraform-provider-yandex/yandex/mdb_opensearch_structures.go:650 +0x1a4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0x14000c3dc80, {0x106702700, 0x140012fe3c0}, 0x14001534820, 0x1400160f680, 0x1066c9b08, {0x1063ea4a0, 0x140009c3600}, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:698 +0x3c4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x106703500?, {0x106702700?, 0x140012fe3c0?}, 0x14001534820, 0x106184ee0?, {0x1063ea4a0?, 0x140009c3600?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:962 +0x9c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0x14000147e60, {0x106702700?, 0x140012fe1b0?}, 0x140012e8870)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:747 +0x850
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.PlanResourceChange({{0x10670c948?, 0x14000147e60?}}, {0x106702700, 0x140012fe1b0}, 0x0?)
github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:81 +0x58
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.muxServer.PlanResourceChange({0x14000cd23f0, 0x14000e9a5c0, 0x14000cd2420, 0x14000cd2450, {0x14000a7cc40, 0x2, 0x2}}, {0x106702700?, 0x140012c3e60?}, 0x140012e8820)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_PlanResourceChange.go:66 +0x1c8
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).PlanResourceChange(0x140006a4e60, {0x106702700?, 0x140012c3470?}, 0x1400021d2d0)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:784 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_PlanResourceChange_Handler({0x1065e9840?, 0x140006a4e60}, {0x106702700, 0x140012c3470}, 0x14000575480, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:404 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0x140009a7000, {0x106702700, 0x14001548000}, {0x10670b380, 0x1400063c1a0}, 0x14001525c20, 0x14000d622a0, 0x107f62a88, 0x0)
google.golang.org/[email protected]/server.go:1372 +0xc6c
google.golang.org/grpc.(*Server).handleStream(0x140009a7000, {0x10670b380, 0x1400063c1a0}, 0x14001525c20)
google.golang.org/[email protected]/server.go:1783 +0xc9c
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1016 +0x5c
created by google.golang.org/grpc.(*Server).serveStreams.func2
google.golang.org/[email protected]/server.go:1027 +0x148
Error: The terraform-provider-yandex_v0.107.0 plugin crashed!
if add dashboards in config block in resource yandex_mdb_opensearch_cluster all works correctly
Originally posted by @vladimir4862 in https://github.com/yandex-cloud/terraform-provider-yandex/issues/403#issuecomment-1943202788
The same behaviour
still crushes in v0.109
Stack trace from the terraform-provider-yandex_v0.109.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x19426d1]
goroutine 29 [running]:
github.com/yandex-cloud/terraform-provider-yandex/yandex.opensearchNodeGroupsDiffCustomize({0x27039e0?, 0xc001011320?}, 0x23c16ea?, {0xd?, 0x23c901d?})
github.com/yandex-cloud/terraform-provider-yandex/yandex/mdb_opensearch_structures.go:650 +0x271
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc000cbed50, {0x27039e0, 0xc001011320}, 0xc0016860d0, 0xc001032060, 0x24794d0, {0x20ce860, 0xc000970840}, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:698 +0x4d4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x27047e0?, {0x27039e0?, 0xc001011320?}, 0xc0016860d0, 0x1e62c20?, {0x20ce860?, 0xc000970840?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:962 +0xe5
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc000d90048, {0x27039e0?, 0xc001011110?}, 0xc00161b900)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:747 +0xa09
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.PlanResourceChange({{0x270e148?, 0xc000d90048?}}, {0x27039e0, 0xc001011110}, 0x0?)
github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:81 +0x5a
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.muxServer.PlanResourceChange({0xc000d074a0, 0xc001098b70, 0xc000d074d0, 0xc000d07500, {0xc000d8c360, 0x2, 0x2}}, {0x27039e0?, 0xc001010de0?}, 0xc00161b8b0)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_PlanResourceChange.go:66 +0x247
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).PlanResourceChange(0xc0004ba280, {0x27039e0?, 0xc000ff7590?}, 0xc0014ef420)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:784 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_PlanResourceChange_Handler({0x22d4f60?, 0xc0004ba280}, {0x27039e0, 0xc000ff7590}, 0xc00163a600, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:404 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0008b3200, {0x27039e0, 0xc000ff7500}, {0x270c900, 0xc0006c3040}, 0xc00165a480, 0xc000974de0, 0x3ff78c8, 0x0)
google.golang.org/[email protected]/server.go:1385 +0xe49
google.golang.org/grpc.(*Server).handleStream(0xc0008b3200, {0x270c900, 0xc0006c3040}, 0xc00165a480)
google.golang.org/[email protected]/server.go:1796 +0x1031
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1029 +0x91
created by google.golang.org/grpc.(*Server).serveStreams.func2
google.golang.org/[email protected]/server.go:1040 +0x145
Error: The terraform-provider-yandex_v0.109.0 plugin crashed!
Just pushed the fix for this issue to the main branch. Fix will be available with the next release.
@saiks24 I don't see it in master. Can you share a link, pls?
@sharovmerk yep, sure. https://github.com/yandex-cloud/terraform-provider-yandex/commit/74f9bc79428ed1eddf3cdeabafcb28eaea1a26e8#diff-bd8d24fc5ba41bfaa61dab60faf0b3c0f742a868edce8f3441c3df2bd89600f8
resolved in the last release: https://github.com/yandex-cloud/terraform-provider-yandex/releases/tag/v0.112.0