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

Error: 500 CT 241 already running, v3.0.1-rc5 #1172

Open
3 tasks done
AobaIwaki123 opened this issue Nov 25, 2024 · 13 comments
Open
3 tasks done

Error: 500 CT 241 already running, v3.0.1-rc5 #1172

AobaIwaki123 opened this issue Nov 25, 2024 · 13 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change resource/lxc Issue or PR related to LXC resource type/bug

Comments

@AobaIwaki123
Copy link

AobaIwaki123 commented Nov 25, 2024

Abstract

I faced an Error Error: 500 CT 241 already running when I create Proxmox LXC with version v3.0.1-rc5
After terraform apply, I got this error but Proxmox LXC is working properly.
So, I guess health check system is something wrong.
And also, I can not do terraform destroy on this LXC for some reason.
It's really inconvenient. I'm really grad if it's fixed

Checked

  • v3.0.1-rc4 does not have this issue
  • If start=false, I can not see this issue. I can do terraform apply and terraform destroy
  • v3.0.1-rc6 has same issue

Full Error Log

module.proxmox_lxc.proxmox_lxc.basic: Creating...
module.proxmox_lxc.proxmox_lxc.basic: Still creating... [10s elapsed]

│ Error: 500 CT 241 already running
│ 
│   with module.proxmox_lxc.proxmox_lxc.basic,
│   on ../../modules/proxmox_lxc/main.tf line 1, in resource "proxmox_lxc" "basic":
│    1: resource "proxmox_lxc" "basic" {

Environment

Here's my environment
If you need more info, please tell me.

  • Ubuntu: 24.10
  • Terraform: v1.9.8
  • tfenv: 3.0.0
  • Proxmox: 8.3.0
  • proxmox provider: 3.0.1-rc5

My Proxmox LXC Module

resource "proxmox_lxc" "basic" {
  features {
      nesting = true
  }
  
  vmid = var.vmid
  target_node  = var.target_node
  hostname     = var.hostname
  ssh_public_keys = var.public_key

  ostemplate   = "local:vztmpl/${var.template}.tar.zst"

  cores  = var.cores
  memory = var.memory

  unprivileged = true
  start       = true

  // Terraform will crash without rootfs defined
  rootfs {
    storage = var.storage
    size    = "${var.disk_size}G"
  }

    network {
        name = "eth0"
        bridge = var.bridge
        ip = "${var.ip_address}/24"
        gw = var.gateway
    }
}
@AobaIwaki123
Copy link
Author

I could not see this issue on 3.0.1-rc6. So, I close this issue

@AobaIwaki123
Copy link
Author

Sorry I did not update provider version from rc4 and I found same issue on rc6.
So, I reopen this issue

@AobaIwaki123 AobaIwaki123 reopened this Nov 26, 2024
@sulaimanzai
Copy link

I also face the same issue! on rc6.

@sulaimanzai
Copy link

sulaimanzai commented Nov 30, 2024

if comment out these in my container config then no error.

# start = true
# onboot = true

but i want to start the container so thats when the error occurs.

@sulaimanzai
Copy link

onboot = true, suppose to turn on the container but it did not during boot.

@sulaimanzai
Copy link

resource "proxmox_lxc" "wireguard" { 
    target_node  = "pve"
    hostname = "wireguard"
    onboot = true
   # start = true
    cores = 1
    memory = "1024"
    swap = "2048"
    nameserver = "8.8.8.8"
    network {
        name = "eth0"
        bridge = "vmbr0"
        ip = "192.168.43.10/32"  
        gw = "192.168.43.1"
        firewall = true
    }
    ostemplate = "local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst" 
    password = var.linux_password
    rootfs {
        storage = "local-lvm"
        size = "8G"
    }
    unprivileged = true
    ssh_public_keys = var.sshkey
}

@AobaIwaki123
Copy link
Author

Checked

  • v3.0.1-rc4 does not have this issue
  • If start=false, I can not see this issue. I can do terraform apply and terraform destroy
  • v3.0.1-rc6 has same issue

As I mentioned here, this issue is appeared on rc5 and rc6.
So, I'm using rc4 to avoid this issue

@bchards
Copy link

bchards commented Dec 23, 2024

Also experiencing the same issue with v3.0.1-rc6 - switching to rc4 fixes the issue for now as mentioned.

@bdruth
Copy link

bdruth commented Dec 26, 2024

This is happening to me, too. Tracked down the change to this PR #1093

Thoughts @Sonlis? This change is in rc5 and rc6, which matches the observations above.

@Sonlis
Copy link
Contributor

Sonlis commented Dec 26, 2024

I unfortunately do not have access to a proxmox instance for the next 2 weeks, so I cannot reproduce it. I checked the code though and came up with an idea of why it would fail. I think this block of code is useless:

if d.Get("start").(bool) {
, starting or not the LXC is already contained in the config when the LXC is created:
config.Start = d.Get("start").(bool)

Now, I created the PR because the LXC would not start even when setting the boolean, and when running it locally it worked and actually started the LXC. I did not test extensively and actually didn't see that the start boolean is already set in the config. It shouldn't have to try again to start the LXC once it's created, which would explain the error of trying to start an already started LXC.

Again, I cannot affirm 100% that this is the problem until I have access to my proxmox again.

@deakus
Copy link

deakus commented Jan 1, 2025

I also confirm the same issue using proxmox 8.3.2 with Terrform v1.10.3 and provider /telmate/proxmox v3.0.1-rc6

@bluescountry
Copy link

i have same issue

@gilkudik
Copy link

gilkudik commented Jan 6, 2025

I'm having the same issue.

Maybe following this it can be fixed.

@Tinyblargon Tinyblargon added type/bug issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change resource/lxc Issue or PR related to LXC resource labels Jan 7, 2025
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 issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change resource/lxc Issue or PR related to LXC resource type/bug
Projects
None yet
Development

No branches or pull requests

9 participants