Cluster autoscaler probably cannot drain nodes running Tapas pods
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 46/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go, kubernetes
- Domain
- infrastructure
Research direction
Start with internal/executor/kube/layout.go:22-27 and trace pod creation in internal/executor/kube/render.go:23, plus the emptyDir definitions in internal/pixienv/pixienv.go:266, internal/podfiles/podfiles.go:72, and internal/controller/jobs/build.go:245. Compare the generated pod volumes and annotations with the cluster autoscaler's FAQ, then verify the behavior on an autoscaled node with an app pod and a job pod. Done means the observed eviction behavior is documented and the annotation behavior or intended policy is resolved.
Written by the indexing model from the issue text.
Description
Tapas marks app, run and file pods with cluster-autoscaler.kubernetes.io/safe-to-evict-local-volumes: scratch,tmp (internal/executor/kube/layout.go:22-27), so the cluster autoscaler can drain a node whose only local data is scratch space. Reading the code against the autoscaler's FAQ, I don't think the annotation can have that effect for any of our pods.
App and file pods are bare pods. Render creates a corev1.Pod with no owner (internal/executor/kube/render.go:23). The FAQ ("What types of pods can prevent CA from removing a node?") lists "Pods that are not backed by a controller object" as blocking scale-down, unless the pod has cluster-autoscaler.kubernetes.io/safe-to-evict: "true". The local-volumes annotation doesn't lift that.
Job pods have unlisted emptyDirs. Job pods do have a controller, so the local-storage rule applies to them. The FAQ says the annotation only helps when "all of the pod's local volumes are listed in the annotation value", and it counts every emptyDir that isn't medium: Memory. Our pods carry several besides scratch and tmp, for example:
javo-env(internal/pixienv/pixienv.go:266);- the pod-files volumes (
internal/podfiles/podfiles.go:72); - the runner volume for jobs (
internal/controller/jobs/build.go:245).
What I haven't checked: I haven't drained a node with the autoscaler, and the FAQ doesn't spell out what happens when one local volume is missing from the list. To check, run an app and a job on a node of an autoscaled group (autoscaler defaults, which per the FAQ's parameter table include --skip-nodes-with-local-storage=true), leave the node otherwise idle, and see whether the autoscaler removes it or logs the pod as blocking.
If it holds, we need to decide what we want:
- App pods: is it safe to evict a running app? Evicting stops the person's session; the home survives. If yes, set
safe-to-evict: "true". If no, the current behaviour is right and the local-volumes annotation is dead code. - Job pods: list every emptyDir in the annotation, built from the pod's volumes instead of a fixed string.
Found while writing the pixi mirror spec (#25), which adds one more emptyDir (envs) to the list.
- Dominant language
- Go
- Stars
- 5
- Forks
- 0
- Avg merge
- 21h 13m
- Merged PRs (30d)
- 53
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nebari-dev/tapas
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nebari-dev/tapas#124 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nebari-dev/tapas#121 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nebari-dev/tapas#32 ·
Maintainers usually reply within 1 day
-
Suggest saving a memory when a chat message holds something worth rememberingPossibly taken @jbouder claimed this today. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
nebari-dev/tapas#137 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 54/100
nebari-dev/tapas#136 ·
Maintainers usually reply within 1 day
All issues in nebari-dev/tapas
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
prime-radiant-inc/evener#8335 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Docker healthcheck logs a 500 on every checkPossibly taken @zackwag claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
writefreely/writefreely#1801 ·
Maintainers usually reply within 2 days
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
contribution Windows 主机
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Lee-xeo/Claude-Cage#1519 ·
Maintainers usually reply within 1 day