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

PVE: 8.3.2 Provider: 3.0.1-rc6 - Simple clone of LXC template produces: panic: assignment to entry in nil map #1219

Open
mnejmantowicz opened this issue Jan 3, 2025 · 1 comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented resource/lxc Issue or PR related to LXC resource type/bug type/upstream This is an issue in one of our dependencies and should be reported there

Comments

@mnejmantowicz
Copy link

Trying to clone a template:

resource "proxmox_lxc" "clone" {
  target_node   = "pve2"
  hostname      = "lxc-clone"
  #id of lxc container to clone
  clone         = "905"
  full          = true
  clone_storage = "ceph-replicate"
  force         = true
  tags          = "priv;test"
}

LXC is created but, as an example, no tags get applied.

Complete Error:

proxmox_lxc.clone: Creating...
proxmox_lxc.clone: Still creating... [10s elapsed]
╷
│ Error: Request cancelled
│ 
│   with proxmox_lxc.clone,
│   on clone_lxc.tf line 1, in resource "proxmox_lxc" "clone":
│    1: resource "proxmox_lxc" "clone" {
│ 
│ The plugin.(*GRPCProvider).ApplyResourceChange request was cancelled.
╵

Stack trace from the terraform-provider-proxmox_v3.0.1-rc6 plugin:

panic: assignment to entry in nil map

goroutine 67 [running]:
github.com/Telmate/terraform-provider-proxmox/v2/proxmox.resourceLxcCreate(0x0?, {0x10342b740?, 0x1400065e870?})
        github.com/Telmate/terraform-provider-proxmox/v2/proxmox/resource_lxc.go:573 +0x1640
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1035976b8?, {0x1035976b8?, 0x14000717b30?}, 0xd?, {0x10342b740?, 0x1400065e870?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:794 +0x134
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x140003e4c40, {0x1035976b8, 0x14000717b30}, 0x1400063a410, 0x14000189700, {0x10342b740, 0x1400065e870})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:937 +0x86c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x14000364000, {0x1035976b8?, 0x14000717a40?}, 0x14000146370)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1153 +0xb08
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x14000276000, {0x1035976b8?, 0x14000717020?}, 0x1400013e770)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x2b0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x103564220?, 0x14000276000}, {0x1035976b8, 0x14000717020}, 0x14000188900, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x1400017f200, {0x1035976b8, 0x14000716f60}, {0x10359b638, 0x14000270480}, 0x14000616000, 0x14000716de0, 0x103ae7018, 0x0)
        google.golang.org/[email protected]/server.go:1369 +0xba0
google.golang.org/grpc.(*Server).handleStream(0x1400017f200, {0x10359b638, 0x14000270480}, 0x14000616000)
        google.golang.org/[email protected]/server.go:1780 +0xc80
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 55
        google.golang.org/[email protected]/server.go:1030 +0x150

Error: The terraform-provider-proxmox_v3.0.1-rc6 plugin crashed!

Added more permissions than recommended to Terraform Role in PVE, but to no avail.

@mnejmantowicz mnejmantowicz changed the title PVE: 8.3.2 Provider: 3.0.1-rc6 - Simple clone of template produces: panic: assignment to entry in nil map PVE: 8.3.2 Provider: 3.0.1-rc6 - Simple clone of LXC template produces: panic: assignment to entry in nil map Jan 3, 2025
@Tinyblargon Tinyblargon added type/bug type/upstream This is an issue in one of our dependencies and should be reported there issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented resource/lxc Issue or PR related to LXC resource labels Jan 7, 2025
@Tinyblargon
Copy link
Collaborator

Tinyblargon commented Jan 7, 2025

@mnejmantowicz The issue is upstream in the project we use to talk to PVE. The LXC implementation is being reworked there, which should resolve these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented resource/lxc Issue or PR related to LXC resource type/bug type/upstream This is an issue in one of our dependencies and should be reported there
Projects
None yet
Development

No branches or pull requests

2 participants