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

Adding tags oci terraform plugin crash #2208

Open
saltie opened this issue Oct 7, 2024 · 5 comments
Open

Adding tags oci terraform plugin crash #2208

saltie opened this issue Oct 7, 2024 · 5 comments
Labels
awaiting-affected-resources Please Provide the affected resource name in description. ex. Affected resource - oci_core_instance bug

Comments

@saltie
Copy link

saltie commented Oct 7, 2024

Terraform Version and Provider Version

terraform-v1.9.5 --version
Terraform v1.9.5
on darwin_amd64

  • provider registry.terraform.io/hashicorp/template v2.2.0
  • provider registry.terraform.io/oracle/oci v6.12.0

Affected Resource(s)

oci_core_instance

Debug Output

│ Error: Request cancelled

│ with module.compute["enge2e-mx972"].oci_core_instance.this[0],
│ on .terraform/modules/compute/modules/compute-instance/instance.tf line 37, in resource "oci_core_instance" "this":
│ 37: resource "oci_core_instance" "this" {

│ The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Stack trace from the terraform-provider-oci_v6.12.0 plugin:

panic: interface conversion: interface {} is map[string]interface {}, not map[string]map[string]interface {}

goroutine 92 [running]:
github.com/oracle/terraform-provider-oci/internal/service/core.(*CoreInstanceResourceCrud).Update(0xc0044e6480)
github.com/oracle/terraform-provider-oci/internal/service/core/core_instance_resource.go:1511 +0x2119
github.com/oracle/terraform-provider-oci/internal/tfresource.UpdateResource({0xd698cd0, 0xc003094b00}, {0xd6198a0, 0xc0044e6480})
github.com/oracle/terraform-provider-oci/internal/tfresource/crud_helpers.go:359 +0x134
github.com/oracle/terraform-provider-oci/internal/service/core.updateCoreInstance(0xc003094b00, {0xd590b40, 0xc002c103d8})
github.com/oracle/terraform-provider-oci/internal/service/core/core_instance_resource.go:1039 +0x2ed
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xd68a738?, {0xd68a738?, 0xc0049afda0?}, 0xd?, {0xd590b40?, 0xc002c103d8?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:800 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0023d3420, {0xd68a738, 0xc0049afda0}, 0xc002c16dd0, 0xc003094880, {0xd590b40, 0xc002c103d8})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:919 +0x83a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc002b5e708, {0xd68a738?, 0xc0049afc80?}, 0xc00011c4b0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:1078 +0xd5c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0001a3400, {0xd68a738?, 0xc0049ae9c0?}, 0xc003040620)
github.com/hashicorp/terraform-plugin-go@v0.22.0/tfprotov5/tf5server/server.go:846 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xd2272a0, 0xc0001a3400}, {0xd68a738, 0xc0049ae9c0}, 0xc004361380, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.22.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000222e00, {0xd68a738, 0xc004a331d0}, {0xd69f0e0, 0xc002b94340}, 0xc0034c0900, 0xc002b6b8c0, 0x11937098, 0x0)
google.golang.org/grpc@v1.61.1/server.go:1385 +0xdd1
google.golang.org/grpc.(*Server).handleStream(0xc000222e00, {0xd69f0e0, 0xc002b94340}, 0xc0034c0900)
google.golang.org/grpc@v1.61.1/server.go:1796 +0xfb8
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.61.1/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 67
google.golang.org/grpc@v1.61.1/server.go:1040 +0x125

Error: The terraform-provider-oci_v6.12.0 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.

Expected Behavior

Expect to be able to update tags

Actual Behavior

Maybe 10 nodes complete before crash

Steps to Reproduce

Add tags to an instance and run terraform on multiple nodes

@saltie saltie added the bug label Oct 7, 2024
@tf-oci-pub
Copy link
Member

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format.
Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform.
Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.

@tf-oci-pub tf-oci-pub added the awaiting-affected-resources Please Provide the affected resource name in description. ex. Affected resource - oci_core_instance label Oct 7, 2024
@saltie
Copy link
Author

saltie commented Oct 8, 2024

Affected Resource(s)

affected_resources = oci_core_instance

@saltie
Copy link
Author

saltie commented Oct 8, 2024

Note that this was readily reproducible using version v6.12.0 of oci sdk. After every 10 node tag addition i would see a crash.
Reverted back to oci v6.11.0 and it ran with no issues. This is clearly something that has regressed in v6.12.0.

@saltie
Copy link
Author

saltie commented Oct 10, 2024

Any update on this?

@saltie
Copy link
Author

saltie commented Oct 30, 2024

Up to version 6.15.0 and this is still not addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-affected-resources Please Provide the affected resource name in description. ex. Affected resource - oci_core_instance bug
Projects
None yet
Development

No branches or pull requests

2 participants