Telmate / terraform-provider-proxmox

Terraform provider plugin for proxmox
MIT License
2.21k stars 533 forks source link

Always timeout around 10 minutes or less #1115

Open TKinslayer opened 1 month ago

TKinslayer commented 1 month ago

When creating more than one VMs with Terraform (either rc1, rc2 or rc4), I always get timeout before it can finish the last VMs I want to deploy while getting an

Here is an example of the error I get :

Error: error updating VM: 596 Connection timed out, error status: (params: map[agent:1 balloon:0 bios:seabios cicustom: cipassword: ciupgrade:1 cores:2 cpu:host delete:ide2,

I already added the required parameters to extend the timeout both in the provider section

provider "proxmox" {
    pm_tls_insecure = true
    pm_api_url = [PROXMOX-IP-ADDRESS]
    pm_api_token_secret = [PROXMOX-API-TOKEN]
    pm_api_token_id = [PROXMOX-TOKEN-ID]
    pm_timeout = 5000
    pm_parallel = 2
}

And also inside the main.tf file :

timeouts {
        create = "2h"
        update = "2h"
        delete = "1h"
}

I even went into the Proxmox event manager (the perl5 config files) to extend the custom timeout period, but to no avail.

It can happen with 1 VM and I get timed out after 2 minutes (and sometimes not), but it happen more often with deployment of 4 to 10 VMs. Then... something odd happens. When I want to deploy 4 or 5 VM in one deployment file, it will fail at the 4th or 5th. But when I want to deploy 9, it will fail at the 8th or 9th. It's a bit weird.

Has anyone been confronted with the same problem and found a solution/fix, or is it a bug to be fixed ?

Tinyblargon commented 4 weeks ago

@TKinslayer can you send an example of your Resource file.

experienced Error: error updating VM: 596 when too many hot-swapable devices get updated at the same time, the PVE web-server seems to hang for a moment.