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

Provider 1.4.0-rc2 crashes when changing marketplace appliance version #521

Closed
frousselet opened this issue Jan 19, 2024 · 0 comments · Fixed by #522
Closed

Provider 1.4.0-rc2 crashes when changing marketplace appliance version #521

frousselet opened this issue Jan 19, 2024 · 0 comments · Fixed by #522

Comments

@frousselet
Copy link
Collaborator

Description

The provider 1.4.0-rc2 crashes when changing marketplace appliance version

Terraform and Provider version

1.4.0-rc2

Affected resources and data sources

opennebula_marketplace_appliance

Terraform configuration

resource "opennebula_marketplace_appliance" "test_marketplace_s3_clone_from_url" {
  name        = "test-marketplace-url"
  market_id   = opennebula_marketplace.test_marketplace_s3.id
  type        = "IMAGE"
  description = "this is an app"
  version     = "0.3.0"
  origin_id   = opennebula_image.test_marketplace_s3_clone_from_url.id
}

Expected behavior

Versions updates

Actual behavior

Provider crashes

Steps to Reproduce

Deploy with version 0.1.0 -> Fine
Change to version 0.3.0 -> KO

Debug output

2024-01-19T14:46:49.069+0100 [ERROR] vertex "opennebula_marketplace_appliance.test_marketplace_s3_clone_from_url" error: Plugin did not respond
╷
│ Error: Plugin did not respond
│ 
│   with opennebula_marketplace_appliance.test_marketplace_s3_clone_from_url,
│   on test_marketplace.tf line 47, in resource "opennebula_marketplace_appliance" "test_marketplace_s3_clone_from_url":
│   47: resource "opennebula_marketplace_appliance" "test_marketplace_s3_clone_from_url" {
│ 
│ 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-opennebula plugin:

panic: interface conversion: interface {} is string, not int

goroutine 27 [running]:
github.com/OpenNebula/terraform-provider-opennebula/opennebula.resourceOpennebulaMarketPlaceAppUpdate({0x10390f950, 0x140002f92d0}, 0x14000434a80, {0x103803c00?, 0x1400001e900?})
	/Users/fro/Projets/github/opennebula/terraform-provider-opennebula/opennebula/resource_opennebula_marketplace_app.go:576 +0x25fc
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0x14000498ee0, {0x10390f8a8, 0x14000290e70}, 0xd?, {0x103803c00, 0x1400001e900})
	/Users/fro/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:741 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x14000498ee0, {0x10390f8a8, 0x14000290e70}, 0x140002885b0, 0x14000434900, {0x103803c00, 0x1400001e900})
	/Users/fro/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:847 +0x63c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x1400000e030, {0x10390f8a8?, 0x14000290d80?}, 0x140001dc640)
	/Users/fro/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1021 +0xb08
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x140004aa000, {0x10390f8a8?, 0x14000186c60?}, 0x140002f8070)
	/Users/fro/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:818 +0x3c0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1038d1a60?, 0x140004aa000}, {0x10390f8a8, 0x14000186c60}, 0x140002f8000, 0x0)
	/Users/fro/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x140000ba000, {0x103914060, 0x1400019fa00}, 0x1400017e000, 0x1400049e300, 0x103e58cc0, 0x0)
	/Users/fro/go/pkg/mod/google.golang.org/[email protected]/server.go:1335 +0xbe0
google.golang.org/grpc.(*Server).handleStream(0x140000ba000, {0x103914060, 0x1400019fa00}, 0x1400017e000, 0x0)
	/Users/fro/go/pkg/mod/google.golang.org/[email protected]/server.go:1712 +0x7cc
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	/Users/fro/go/pkg/mod/google.golang.org/[email protected]/server.go:947 +0xb4
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 22
	/Users/fro/go/pkg/mod/google.golang.org/[email protected]/server.go:958 +0x160

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

2024-01-19T14:46:49.076+0100 [DEBUG] provider: plugin exited
2024-01-19T14:46:49.150+0100 [INFO]  Terraform version: 1.6.6                                                                                                                       
2024-01-19T14:46:49.150+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.36.0
2024-01-19T14:46:49.150+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.19.1
2024-01-19T14:46:49.150+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-01-19T14:46:49.150+0100 [DEBUG] using github.com/zclconf/go-cty v1.14.1
2024-01-19T14:46:49.150+0100 [INFO]  Go runtime version: go1.21.5
2024-01-19T14:46:49.150+0100 [INFO]  CLI args: []string{"/opt/homebrew/Cellar/tfenv/3.0.0/versions/1.6.6/terraform", "--version"}
2024-01-19T14:46:49.150+0100 [DEBUG] Attempting to open CLI config file: /Users/fro/.terraformrc
2024-01-19T14:46:49.150+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2024-01-19T14:46:49.150+0100 [DEBUG] checking for credentials in "/Users/fro/.terraform.d/plugins"
2024-01-19T14:46:49.150+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2024-01-19T14:46:49.150+0100 [DEBUG] will search for provider plugins in /Users/fro/.terraform.d/plugins
2024-01-19T14:46:49.150+0100 [DEBUG] ignoring non-existing provider search directory /Users/fro/Library/Application Support/io.terraform/plugins
2024-01-19T14:46:49.150+0100 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2024-01-19T14:46:49.151+0100 [INFO]  CLI command args: []string{"version", "--version"}

Panic output

panic: interface conversion: interface {} is string, not int

Important factoids

No response

References

No response

frousselet added a commit that referenced this issue Jan 19, 2024
frousselet added a commit that referenced this issue Jan 19, 2024
frousselet added a commit that referenced this issue Jan 19, 2024
@frousselet frousselet linked a pull request Jan 19, 2024 that will close this issue
7 tasks
@frousselet frousselet self-assigned this Jan 19, 2024
@frousselet frousselet added this to the 1.4.0 milestone Jan 19, 2024
frousselet added a commit that referenced this issue Jan 19, 2024
frousselet added a commit that referenced this issue Jan 19, 2024
frousselet added a commit that referenced this issue Jan 19, 2024
frousselet added a commit that referenced this issue Jan 19, 2024
frousselet added a commit that referenced this issue Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant