Closed serafdev closed 1 month ago
Thanks for the bug report!
I was able to reproduce this issue locally by applying, resizing the node pool up by one node, and applying again. Additionally, this issue only seems to occur when the ignore_changes
lifecycle rule is specified.
Fortunately, it looks like applying does not destroy or recreate the existing node pool as you mentioned, but the inaccurate diff can definitely lead to some user confusion.
I've added this issue to our internal tracker and will let you know when we have any updates š
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Still actual.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
still actual
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
still actual š
I created issue https://github.com/linode/terraform-provider-linode/issues/1076 with an enhancement path that could help with this issue.
Closing this issue out since it should have been resolved in https://github.com/linode/terraform-provider-linode/pull/1260. If this bug is still relevant feel free to @ me and it can be reopened š
@lgarber-akamai I am still seeing this issue
@Aransh Thank you for the info!
I'm not entirely sure if this is related but could you try dropping the count
field from the node pool and ignore_changes
block from the resource? These were previously required as a workaround but are no longer necessary for autoscaled pools now that count has been made optional.
If that doesn't work, could you share your (sanitized) Terraform state with us as well as any other relevant information you have?
Hi @lgarber-akamai here's some additional details:
I have already removed the count
field and ignore_changes
prior.
This is my current cluster in tfstate (sanitized of all ids/urls):
# module.csi_cluster.linode_lke_cluster.csi-k8s-cluster:
resource "linode_lke_cluster" "csi-k8s-cluster" {
api_endpoints = [
"https://xxxx.us-iad-2.linodelke.net:443",
"https://xxxx.us-iad-2.linodelke.net:6443",
"https://xxxx:443",
"https://xxxx:6443",
]
dashboard_url = "https://xxxx.dashboard.us-iad-2.linodelke.net"
id = "xxxx"
k8s_version = "1.27"
kubeconfig = (sensitive value)
label = "xxxx"
region = "us-iad"
status = "ready"
tags = [
"dev",
]
control_plane {
high_availability = true
}
pool {
count = 98
id = xxxx
nodes = [
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
]
type = "g6-dedicated-32"
autoscaler {
max = 100
min = 2
}
}
pool {
count = 40
id = 228786
nodes = [
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "not_ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
]
type = "g6-dedicated-32"
autoscaler {
max = 100
min = 2
}
}
}
This is the relevant part of my module to create the cluster:
resource "linode_lke_cluster" "csi-k8s-cluster" {
k8s_version = "1.27"
label = "xxxx"
region = "us-iad"
tags = ["dev"]
dynamic "pool" {
for_each = var.pools
content {
type = pool.value["type"]
autoscaler {
min = pool.value["min"]
max = pool.value["max"]
}
}
}
control_plane {
high_availability = true
}
}
And these are the relevant tfvars (note 2 pools because max is 100 nodes):
pools = [
{
type = "g6-dedicated-32"
min = 2
max = 100
},
{
type = "g6-dedicated-32"
min = 2
max = 100
}
]
Running apply on this configuration gives me this plan:
# module.csi_cluster.linode_lke_cluster.csi-k8s-cluster has changed
~ resource "linode_lke_cluster" "csi-k8s-cluster" {
id = "xxxx"
tags = [
"dev",
]
# (7 unchanged attributes hidden)
~ pool {
~ count = 40 -> 39
id = xxxx
~ nodes = [
# (26 unchanged elements hidden)
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
- {
- id = "xxxx"
- instance_id = xxxx
- status = "not_ready"
},
{
id = "xxxx"
instance_id = xxxx
status = "ready"
},
# (11 unchanged elements hidden)
]
# (1 unchanged attribute hidden)
# (1 unchanged block hidden)
}
# (2 unchanged blocks hidden)
}
As you can see the changes here are for the count field (which I do not provide), and for the list of nodes (which I do not manage).
Also worth mentioning I recently tried to state rm
and import
this cluster to solve this issue, it did solve it (plan was empty), but as soon as nodes were replaced, same issue.
@Aransh Thank you for the detailed info and sorry to hear this has been a continued issue. I'll see if I can reproduce this on my end using your configuration.
Unfortunately, I haven't had any luck reproducing this issue on the latest version of the provider yet. We still have this issue on our radar so I'll update this issue if we make any progress :+1:
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Still experiencing this
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Still happening
@Aransh what version of the Linode TF provider are you using?
@jcallahan-akamai 2.23.0
Hi @Aransh, unfortunately we are stumped by this one. We have tried to reproduce this bug several times with no success. I'm going to close this issue, but if you are able to produce a minimal, reproducible example, feel free to open it back up.
Terraform Version
Terraform v1.3.6 on linux_amd64
Linode Provider Version
version = "1.30.0
Effected Terraform Resources
linode_lke_cluster
Terraform Config Files
Debug Output
Panic Output
No response
Expected Behavior
Should not be modifying the cluster's pool or anything in the
lke
clusterActual Behavior
kubeconfig
fileSteps to Reproduce
linode_lke_cluster
terraform resource.kubeconfig
output to a local fileterraform apply
and wait for cluster to be createdterraform apply
without modifying anything