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

Kernal Panic - interface conversion: interface {} is string, not float64 #903

Closed
pyrosyndicate opened this issue Jan 19, 2024 · 16 comments
Closed
Labels

Comments

@pyrosyndicate
Copy link

I am trying to build a simple VM within proxmox using a simple sample script.

maintf.txt
varstf.txt

Issue in console from client running the code is:

proxmox_vm_qemu.testserver[0]: Creating...
proxmox_vm_qemu.testserver[0]: Still creating... [10s elapsed]
proxmox_vm_qemu.testserver[0]: Still creating... [20s elapsed]

│ Error: Request cancelled

│ with proxmox_vm_qemu.testserver[0],
│ on main.tf line 33, in resource "proxmox_vm_qemu" "testserver":
│ 33: resource "proxmox_vm_qemu" "testserver" {

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

Stack trace from the terraform-provider-proxmox_v2.9.14 plugin:

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

goroutine 32 [running]:
github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc0007b8718, 0x189e92a?)
github.com/Telmate/[email protected]/proxmox/config_qemu.go:584 +0x4605
github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc000614a00, {0x1767860?, 0xc0004b4d20})
github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:972 +0x2c4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x19d8be0?, {0x19d8be0?, 0xc0001bd4d0?}, 0xd?, {0x1767860?, 0xc0004b4d20?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:695 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0003767e0, {0x19d8be0, 0xc0001bd4d0}, 0xc0006341a0, 0xc000614280, {0x1767860, 0xc0004b4d20})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:837 +0xa85
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000410b70, {0x19d8be0?, 0xc0001bd3b0?}, 0xc00041e2d0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1021 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000000460, {0x19d8be0?, 0xc0001bc540?}, 0xc0001c6070)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x186d600?, 0xc000000460}, {0x19d8be0, 0xc0001bc540}, 0xc0001c6000, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000361e0, {0x19dc840, 0xc0004824e0}, 0xc000422000, 0xc000428bd0, 0x1e95900, 0x0)
google.golang.org/[email protected]/server.go:1336 +0xd23
google.golang.org/grpc.(*Server).handleStream(0xc0000361e0, {0x19dc840, 0xc0004824e0}, 0xc000422000, 0x0)
google.golang.org/[email protected]/server.go:1704 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/[email protected]/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:963 +0x28a

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

and error log is attached:
terraform-plugin-proxmox.log

Interestingly the VM is being created and does boot succesfully. I have not attempted to login yet. but Terraform is not aware of this and a plan shows as the vm not existing.

@BrinRe
Copy link

BrinRe commented Jan 19, 2024

Almost the same thing for me. Using Version 2.9.11 of the plugin, I got the following message:

 Error: Plugin did not respond
│
│   with proxmox_vm_qemu.tf-user[0],
│   on main.tf line 16, in resource "proxmox_vm_qemu" "tf-user":
│   16: resource "proxmox_vm_qemu" "tf-user" {
│
│ 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-proxmox_v2.9.11 plugin:

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

goroutine 40 [running]:
github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc000462530, 0xc0000345b0?)
        github.com/Telmate/[email protected]/proxmox/config_qemu.go:579 +0x4774
github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc000195800, {0xb2bec0?, 0xc0000b58b0})
        github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:908 +0x25fd
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xd847f0?, {0xd847f0?, 0xc0003f0930?}, 0xd?, {0xb2bec0?, 0xc0000b58b0?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:695 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000182e00, {0xd847f0, 0xc0003f0930}, 0xc000571040, 0xc000195600, {0xb2bec0, 0xc0000b58b0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:837 +0xa7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc0002d24c8, {0xd847f0?, 0xc0003f0810?}, 0xc000526370)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1021 +0xe3c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000207860, {0xd847f0?, 0xc0003f01e0?}, 0xc0005642a0)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xc29f00?, 0xc000207860}, {0xd847f0, 0xc0003f01e0}, 0xc000564230, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002601e0, {0xd87268, 0xc00008a680}, 0xc000398fc0, 0xc0002e4780, 0x1212d00, 0x0)
        google.golang.org/[email protected]/server.go:1295 +0xb0b
google.golang.org/grpc.(*Server).handleStream(0xc0002601e0, {0xd87268, 0xc00008a680}, 0xc000398fc0, 0x0)
        google.golang.org/[email protected]/server.go:1636 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:932 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:930 +0x28a

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

Same thing, after having upgraded to Version 2.9.14 ...

@glennlagasse
Copy link

I'm getting the same error. In my case, the same terraform code works without error when targetting proxmox ve 7 instances but fails when targetting proxmox ve 8 instances.

@cwilliams001
Copy link

You can check these issues as well. I am currently using @TheGameProfi release and it works fine besides an issue with a cloud init drive that he and a few others are working on. There is also a discord https://discord.gg/vn5sbuNkfc

#863
#884
#887

@pyrosyndicate
Copy link
Author

pyrosyndicate commented Jan 20, 2024

It seems a solution was found on #863 #863 (comment)

in november, shocked this hasnt been addressed in the plugin yet?

@MaartendeKruijf
Copy link
Contributor

@pyrosyndicate it has been addressed in the repo but we need to make a new release you can use https://registry.terraform.io/providers/TheGameProfi/proxmox/2.9.16

@pyrosyndicate
Copy link
Author

pyrosyndicate commented Jan 22, 2024

The fork mentioned is also broken. Cloud init drives on template break the deploy in a similar fashion so not a solution.

@MaartendeKruijf
Copy link
Contributor

Yeah the disks are broken we are still working on that

@gesandovalr
Copy link

Same thing, the weekend we did an update from 8.0 to 8.1.4 it the stopped working same error.

@chodorenko
Copy link

chodorenko commented Feb 5, 2024

At the same problem
@Tinyblargon May be you have any news ?

@Jasmont
Copy link

Jasmont commented Feb 5, 2024

Experiencing same issue. Right after update to 8.1.4. Recent rc version works but missing configuration options which were crucial in my case.

@hestiahacker
Copy link
Contributor

Can anyone reproduce this issue with the 3.0.1-rc1 release? I didn't run into it when I was testing, and I'm not sure if it was fixed between 2.9.14 and 3.0.1-rc1 or if there's some subtle difference between the example posted in this report and the example I am using. Aside from the disk -> disks change, the two examples really look pretty similar.

@Tinyblargon
Copy link
Collaborator

@hestiahacker, this panic is fixed in the new version. This was an issue in the underlying proxmox-go-api project Telmate/proxmox-api-go#285

Copy link

This issue is stale because it has been open for 60 days with no activity. Please update the provider to the latest version and, in the issue persist, provide full configuration and debug logs

@github-actions github-actions bot added the stale label May 13, 2024
Copy link

This issue was closed because it has been inactive for 5 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
@pich4ya
Copy link

pich4ya commented Jul 14, 2024

terraform init pull the 2.9.14 version, in which, the error still persists.

@lotusnoir
Copy link

You must add the proper version on your provider file

terraform {
    required_providers {
        proxmox =  {
        source = "Telmate/proxmox"
        version = "3.0.1-rc3"
        }
    }
}

Then just update it

terraform init -upgrade
Initializing the backend...
Upgrading modules...
- finance in ../../modules/terraform-module-proxmox_vm
Initializing provider plugins...
- Finding latest version of hashicorp/null...
- Finding telmate/proxmox versions matching ">= 2.9.14, 3.0.1-rc3"...
- Using previously-installed hashicorp/null v3.2.2
- Installing telmate/proxmox v3.0.1-rc3...
- Installed telmate/proxmox v3.0.1-rc3 (self-signed, key ID A9EBBE091B35AFCE)

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