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

Plugin crashes on openstack_containerinfra_cluster_v1 #1308

Closed
dhrp opened this issue Nov 4, 2021 · 4 comments
Closed

Plugin crashes on openstack_containerinfra_cluster_v1 #1308

dhrp opened this issue Nov 4, 2021 · 4 comments
Labels

Comments

@dhrp
Copy link

dhrp commented Nov 4, 2021

Hi there,

I noticed this plugin crash error on using openstack_containerinfra_cluster_v1, and it explicitly asks to report plugin crashes.

Terraform Version

Oswald:tesla thatcher$ terraform -v
Terraform v1.0.2
on darwin_amd64
+ provider registry.terraform.io/terraform-provider-openstack/openstack v1.44.0

Affected Resource(s)

Please list the resources as a list, for example:

  • openstack_containerinfra_cluster_v1

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "openstack_containerinfra_cluster_v1" "X" {
  name                = "X"
  cluster_template_id = "34af9035-edbc-4e97-96e3-d714eb963508"
  master_count        = 1
  node_count          = 1
  keypair             = "thatcher_oatcake"
}

Debug Output

https://gist.github.com/dhrp/cdc99d16a5ce6c2dcb3d2b5bd0a72234

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

What should have happened?
Show plan output

Actual Behavior

Showed this error

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply (creates the cluster succesfully)
  2. change a field (e.g. node_count)
  3. terraform plan -> boom!

Important Factoids

Nothing crazy..

References

@baylisscg
Copy link

This appears to have been introduced v1.43.1 → v1.44.0 so I guess it's a plugin SDK upgrade issue.

@pawcykca
Copy link
Contributor

For me this happen during 'destroy' command:

$ terraform -v
Terraform v1.0.11
on linux_amd64
+ provider registry.terraform.io/terraform-provider-openstack/openstack v1.45.0

$ terraform destroy
openstack_containerinfra_clustertemplate_v1.clustertemplate_1: Refreshing state... [id=...]
openstack_containerinfra_cluster_v1.cluster_1: Refreshing state... [id=...]
╷
│ Error: Plugin did not respond
│
│   with openstack_containerinfra_cluster_v1.cluster_1,
│   on cluster.tf line 1, in resource "openstack_containerinfra_cluster_v1" "cluster_1":
│    1: resource "openstack_containerinfra_cluster_v1" "cluster_1" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-openstack_v1.45.0 plugin:

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

goroutine 97 [running]:
github.com/terraform-provider-openstack/terraform-provider-openstack/openstack.flattenContainerInfraV1Kubeconfig(0xc00077c680, 0x10fa9f7)
        github.com/terraform-provider-openstack/terraform-provider-openstack/openstack/containerinfra_shared_v1.go:175 +0xcd4
github.com/terraform-provider-openstack/terraform-provider-openstack/openstack.resourceContainerInfraClusterV1Read({0x12dfc88, 0xc0001aa780}, 0xc00077c680, {0x10c1340, 0xc00059a480})
        github.com/terraform-provider-openstack/terraform-provider-openstack/openstack/resource_openstack_containerinfra_cluster_v1.go:351 +0x937
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0007bd7a0, {0x12dfc88, 0xc0001aa780}, 0x24, {0x10c1340, 0xc00059a480})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.1/helper/schema/resource.go:347 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0007bd7a0, {0x12dfc88, 0xc0001aa780}, 0xc0002e20e0, {0x10c1340, 0xc00059a480})        
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.1/helper/schema/resource.go:624 +0x35b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0006de048, {0x12dfc88, 0xc0001aa780}, 0xc0001aa7c0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.1/helper/schema/grpc_provider.go:575 +0x4bd
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc0001b5a20, {0x12dfd30, 0xc0004081e0}, 0xc0007ac4e0)
        github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/server/server.go:298 +0x1fb
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x10996a0, 0xc0001b5a20}, {0x12dfd30, 0xc0004081e0}, 0xc0007ac480, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0005a8700, {0x12f1d00, 0xc000208900}, 0xc0004b6100, 0xc00011c660, 0x1a25650, 0x0)
        google.golang.org/grpc@v1.32.0/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc0005a8700, {0x12f1d00, 0xc000208900}, 0xc0004b6100, 0x0)
        google.golang.org/grpc@v1.32.0/server.go:1517 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.32.0/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.32.0/server.go:857 +0x294

Error: The terraform-provider-openstack_v1.45.0 plugin crashed!

@dniasoff
Copy link
Contributor

dniasoff commented Dec 2, 2021

Getting same issue

Here is the log with TF debug showing the API output as well

https://gist.githubusercontent.com/dniasoff/7cfebaf826bf13c712a2c4adb547cfc1/raw/9ce441fd893a407eca329d080c1dd1537b16eb63/gistfile1.txt

@pawcykca
Copy link
Contributor

pawcykca commented Feb 8, 2022

Fixed in v1.47.0 release - I didn't notice such an error anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants