bpg / terraform-provider-proxmox

Terraform Provider for Proxmox
https://registry.terraform.io/providers/bpg/proxmox
Mozilla Public License 2.0
874 stars 139 forks source link

cpuunits default to 1024 instead of 100 on cgroup2 machines #1589

Open joshmcorreia opened 1 month ago

joshmcorreia commented 1 month ago

Describe the bug cpuunits default to 1024 regardless of cgroups version. According to the Proxmox wiki, it should default to 100 on machines that support cgroup2

It is a relative weight which defaults to 100 (or 1024 if the host uses legacy cgroup v1).

Since my cluster is on a machine with cgroup2, Proxmox defaults to 100 on all of my other VMs and then the VMs created with this provider end up with 1024.

To Reproduce Steps to reproduce the behavior:

  1. Create a resource "proxmox_virtual_environment_vm"
  2. Run "terraform apply"
  3. See that it gives 1024 cpuunits instead of 100

Please also provide a minimal Terraform configuration that reproduces the issue:

resource "proxmox_virtual_environment_vm" "joshtest" {
  name      = "joshtest"
  node_name = "proxmoxjoshtest"
}

Expected behavior I expect the default to be set depending on the cgroup version supported by the Proxmox server.

Screenshots N/A

Additional context Add any other context about the problem here.