What should Texera do when a computing unit dies? #7670
Replies: 4 comments 1 reply
|
@yrenat Do you want to chime in as you are looking at a related issue? If so, please add the corresponding URL. |
|
Hi @eugenegujing, I agree with @kunwp1 on the possible directions to address your questions, and I would like to add some of my thoughts to your observation. I think you are right that there is no liveness check for a CU, but there does exist such checks for workflows. This PR aims to clean garbage workflow execution results after a configured TTL. It does not directly solve your problem, but I think it shows the possibility to monitor CU status from a workflow perspective. That may be easier to work with because you are technically utilizing something pre-built. Anyway, this PR introduces the
Thanks @chenlica for letting me join this discussion. Hope that helps. |
|
Thanks @kunwp1 and @yrenat. I think this settles all three questions. Here's the direction I'll take in #7669, so the PR review can point back to this thread:
@yrenat Thanks for the pointer to #2123, and I really like the idea of inferring liveness with zero new infrastructure. But I'm afraid it might not work as the primary signal for this particular issue, if I'm reading the code right, I will start working on this for a PR in our current design. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I noticed that a computing unit that is no longer alive is indistinguishable, in the UI, from one that is still booting. Both render as
(Connecting).This isn't a rendering bug. Texera has no representation of an unhealthy computing unit anywhere in the stack, so there is nothing for the UI to render:
ComputingUnitState(ComputingUnitState.scala:23) defines exactlyRunningandPending.ComputingUnitHelpers(:86) resolves status asif (phase == "Running") Running else Pending.workflow-computing-unit.ts:49) isstatus: "Running" | "Pending"— failure isn't expressible.localCUs are hard-coded toRunning(:74-75) with no liveness check at all, so a dead local process shows green.The frontend already has red/error branches (
computeStatus(),getComputingUnitBadgeColor()). They're dead code, because onlyRunningandPendingever reach them. Someone anticipated failure states; the backend never grew them.I've filed the mechanical part as #7669. Three questions I'd rather settle here than inside a PR review.
1. What should the status vocabulary be?
Running / Pending / Failed / Unknown / Terminating. Trivial to map, but it leaks the deployment substrate into a user-facing API and means nothing forlocalCUs.Starting / Ready / Unhealthy / Gone, named for what the user can do with the unit rather than for what k8s calls it. More mapping work, but it stays honest across local, k8s, and whatever comes next.I lean toward the second, but it needs someone to define what "unhealthy" means for a
localCU.2. How much cluster detail should reach the end user?
"Your unit was OOM-killed" is actionable — raise the memory limit. "ImagePullBackOff: manifest unknown" is not something a data scientist can act on and arguably shouldn't be in their face.
There's also a sharing dimension: CU access can be shared (
ComputingUnitAccessResource), so a failure reason reaches READ-privilege users who aren't the owner. Are we comfortable showing pod-level error text to everyone a unit is shared with, or should detail be owner-only with a generic "This unit is unavailable" for others?3. Should a failed CU recover by itself, and is the current answer the one we want?
We already have a recovery policy: restart the container forever, never replace the pod. It falls out of
KubernetesClient.createPod(:117-214), which builds a barePod— no owning Deployment or other controller — and never setsrestartPolicy, so it defaults toAlways. That splits by failure level:There's no server-side reaper (no cleanup or reconcile job in
computing-unit-managing-service), so a dead pod's DB row just persists. Keep delegating to k8s defaults, make it explicit with an owning controller and a restart cap, or move the policy into Texera?The proposal in #7669, and whether there's a better one
ComputingUnitStatestatusReasonstring so the UI can eventually say why.All reactions