Skip to content

[Bug]: Changing value of automatically_upgrade_os has no effect on existing nodes #1489

Open
@ggogel

Description

Description

I created a cluster with the default setting automatically_upgrade_os = true. I noticed that changing this value to false afterward has no effect. It only seems to be applied when a new node is created.

Steps to reproduce:

  1. Create a cluster with automatically_upgrade_os = true
  2. Change the value to automatically_upgrade_os = false
  3. Run terraform plan. No changes are detected.
  4. Run terraform apply.
  5. SSH into one of the nodes and execute systemctl status transactional-update.timer. The status still shows as enabled.

I don't know if this behavior is intended. It would be convenient being able to change this value across all nodes through terraform.

Changing the value automatically_upgrade_k3s applies the changes to the cluster as expected.

Kube.tf file

module "kube-hetzner" {
  providers = {
    hcloud = hcloud
  }
  hcloud_token = var.hcloud_token != "" ? var.hcloud_token : local.hcloud_token

  source = "kube-hetzner/kube-hetzner/hcloud"

  cluster_name = "k8s-prod03"

  ssh_public_key  = file("id_ed25519.pub")
  ssh_private_key = file("id_ed25519")

  network_region = "eu-central"

  control_plane_nodepools = [
    {
      name        = "control-plane-01"
      server_type = "cx22"
      location    = "fsn1"
      labels      = []
      taints      = []
      count       = 3
    }
  ]

  agent_nodepools = [
    {
      name        = "agent-pool-01"
      server_type = "cx32"
      location    = "fsn1"
      labels      = []
      taints      = []
      count       = 2
    }
  ]

  load_balancer_type     = "lb11"
  load_balancer_location = "fsn1"

  ingress_controller = "none"

  initial_k3s_channel = "v1.30"

  automatically_upgrade_os = false
  automatically_upgrade_k3s = true
}

provider "hcloud" {
  token = var.hcloud_token != "" ? var.hcloud_token : local.hcloud_token
}

terraform {
  required_version = ">= 1.5.0"
  required_providers {
    hcloud = {
      source  = "hetznercloud/hcloud"
      version = ">= 1.43.0"
    }
  }
}

output "kubeconfig" {
  value     = module.kube-hetzner.kubeconfig
  sensitive = true
}

variable "hcloud_token" {
  sensitive = true
  default   = ""
}

Screenshots

No response

Platform

Mac

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions