Slackbot
02/13/2023, 9:59 AMLuiz Augusto
02/13/2023, 10:55 AMHow it works
The K8s extension takes the podSpec of your Overlord pod and creates a kubernetes job from this podSpec.
Does it work if Im using coordinator as overlord? Or do I need to explicitly have both defined so Overlord pods can be ‘clone’ into ingestion tasks?
The peons will have the same Xmx/MaxDirectMemory values as Overlord? The same memory limit/request?Jason Witkowski
02/13/2023, 2:46 PMDavid McHealy
02/13/2023, 5:05 PMLuiz Augusto
02/13/2023, 5:57 PMstatic long getContainerMemory(PeonCommandContext context)
{
List<String> javaOpts = context.getJavaOpts();
Optional<Long> optionalXmx = getJavaOptValueBytes("-Xmx", javaOpts);
long heapSize = HumanReadableBytes.parse("1g");
if (optionalXmx.isPresent()) {
heapSize = optionalXmx.get();
}
Optional<Long> optionalDbb = getJavaOptValueBytes("-XX:MaxDirectMemorySize=", javaOpts);
long dbbSize = heapSize;
if (optionalDbb.isPresent()) {
dbbSize = optionalDbb.get();
}
return (long) ((dbbSize + heapSize) * 1.2);
}
protected Container setupMainContainer(PodSpec podSpec, PeonCommandContext context, long containerSize, String taskContents)
{
(...)
mainContainer.setName("main");
ImmutableMap<String, Quantity> resources = ImmutableMap.of(
"cpu",
new Quantity("1000", "m"),
"memory",
new Quantity(String.valueOf(containerSize))
);
mainContainer.setResources(new ResourceRequirementsBuilder().withRequests(resources).withLimits(resources).build());
return mainContainer;
}
Interesting so for the pod requests and limits:
• CPU: always 1
• Memory: (Xmx + MaxDirectMemorySize) + 20%churro
02/13/2023, 6:12 PMLuiz Augusto
02/13/2023, 6:14 PMchurro
02/13/2023, 6:14 PMchurro
02/13/2023, 6:15 PMchurro
02/13/2023, 6:15 PMLuiz Augusto
02/13/2023, 6:16 PMchurro
02/13/2023, 6:17 PMchurro
02/13/2023, 6:17 PMchurro
02/13/2023, 6:17 PMDavid McHealy
02/13/2023, 6:17 PMchurro
02/13/2023, 6:18 PMLuiz Augusto
02/13/2023, 6:19 PMchurro
02/13/2023, 6:21 PMchurro
02/13/2023, 6:21 PMchurro
02/13/2023, 6:22 PMchurro
02/13/2023, 6:22 PMLuiz Augusto
02/13/2023, 6:22 PMone idea i had for a follow-up was the user could specify a template in a configmap or something, then the overlord could use that to launch peon tasks for the more power-useryeah it would be great, eventually it’d be possible to configure peons to run in spot instances with ssd disks.
churro
02/13/2023, 6:22 PMchurro
02/13/2023, 6:23 PMchurro
02/13/2023, 6:23 PMLuiz Augusto
02/13/2023, 6:23 PMchurro
02/13/2023, 6:24 PMchurro
02/13/2023, 6:24 PMchurro
02/13/2023, 6:24 PMLuiz Augusto
02/13/2023, 6:24 PMchurro
02/13/2023, 6:25 PMchurro
02/13/2023, 6:25 PMchurro
02/13/2023, 6:25 PMdruid.indexer.runner.labels
druid.indexer.runner.annotationschurro
02/13/2023, 6:26 PMLuiz Augusto
02/13/2023, 6:26 PMchurro
02/13/2023, 6:26 PMchurro
02/13/2023, 6:27 PMLuiz Augusto
02/13/2023, 6:27 PMDavid McHealy
02/13/2023, 6:28 PMLuiz Augusto
02/13/2023, 6:28 PMchurro
02/13/2023, 6:28 PMchurro
02/13/2023, 6:29 PMchurro
02/13/2023, 6:29 PMchurro
02/13/2023, 6:30 PMAbhishek Agarwal
02/14/2023, 5:28 AMLuiz Augusto
02/14/2023, 9:51 AMAbhishek Agarwal
02/14/2023, 10:01 AMLuiz Augusto
02/14/2023, 10:52 AMAbhishek Agarwal
02/14/2023, 11:20 AMJason Witkowski
02/14/2023, 2:47 PM25.0.1? Things are currently broken for a standard K8s release that has existed for 6 monthschurro
02/14/2023, 6:15 PMchurro
02/14/2023, 6:15 PMchurro
02/14/2023, 7:41 PMDidip Kerabat
02/15/2023, 9:14 PMJason Witkowski
02/15/2023, 9:16 PMDidip Kerabat
02/15/2023, 9:16 PMDavid McHealy
02/15/2023, 9:17 PMchurro
02/15/2023, 9:47 PMenableTaskLogPush flag….churro
02/15/2023, 9:48 PMDidip Kerabat
02/15/2023, 11:41 PMchurro
02/16/2023, 12:50 AMchurro
02/16/2023, 12:54 AMuncountedTerminatedPods=UncountedTerminatedPods(failed=[], succeeded=[e916cbf9-467a-45f3-86a7-3767145d6384], additionalProperties={})
which from the docs:
UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters. The job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding counter. This field is beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null.
So now what happens is the job goes from a state where it is not active, to having uncountedTerminatedPods to then having a status with success or failure. I will push up a one-line fix to make this work, but for those of you working with 1.25 version of k8s, I’m sure you will be affected as well.
Basically add another check to wait on,
Right now we wait for this:
// block until
job.getStatus() != null && job.getActive() == null
// then return
return job.getStatus().getSucceeded() != null
Now the change will be
// block until
job.getStatus() != null && job.getActive() == null && (job.getStatus().getFailed() != null || job.getStatus().getSucceeded() !=null)
// then return
return job.getStatus().getSucceeded() != null
This should keep things backwards compatible and working in all versions of k8s