Source:
<code>protected void internalStart(Map<String, String> startOptions) throws InfrastructureException { KubernetesRuntimeContext<? extends KubernetesEnvironment> context = getContext(); String workspaceId = context.getIdentity().getWorkspaceId(); try { final KubernetesEnvironment k8sEnv = context.getEnvironment(); volumesStrategy.prepare(k8sEnv, workspaceId); startMachines(); final CompletableFuture<Void> failure = new CompletableFuture<>(); final List<CompletableFuture<Void>> machinesFutures = new ArrayList<>(); final List<CompletableFuture<?>> toCancelFutures = new CopyOnWriteArrayList<>(); for (KubernetesMachine machine : machines.values()) { final CompletableFuture<Void> machineRunningFuture = machine.watchReadinessAsync(); toCancelFutures.add(machineRunningFuture); final CompletableFuture<Void> machineBootChain = machineRunningFuture .thenComposeAsync(checkFailure(failure), executor) .thenRun(publishRunningStatus(machine)) .thenCompose(checkFailure(failure)) .thenCompose(bootstrap(toCancelFutures, machine)) .thenCompose(checkFailure(failure)) .thenCompose(checkServers(toCancelFutures, machine)) .exceptionally(publishFailedStatus(failure, machine)); <START> machinesFutures.add(machineBootChain); <END> } waitMachines(machinesFutures, toCancelFutures, failure); } catch (InfrastructureException | RuntimeException | InterruptedException e) { LOG.warn( "Failed to start Kubernetes runtime of workspace {}. Cause: {}", workspaceId, e.getMessage()); boolean interrupted = Thread.interrupted() || e instanceof InterruptedException; probeScheduler.cancel(workspaceId); try { namespace.cleanUp(); } catch (InfrastructureException ignored) { } if (interrupted) { throw new InfrastructureException("Kubernetes environment start was interrupted"); } wrapAndRethrow(e); } }</code><technical_language>executor non-daemon threads. in this case, daemon threads a fit, WDYT</technical_language>

Target:
protected void internalStart(Map<String, String> startOptions) throws InfrastructureException { KubernetesRuntimeContext<? extends KubernetesEnvironment> context = getContext(); String workspaceId = context.getIdentity().getWorkspaceId(); try { final KubernetesEnvironment k8sEnv = context.getEnvironment(); volumesStrategy.prepare(k8sEnv, workspaceId); startMachines(); final CompletableFuture<Void> failure = new CompletableFuture<>(); final List<CompletableFuture<Void>> machinesFutures = new ArrayList<>(); final List<CompletableFuture<?>> toCancelFutures = new CopyOnWriteArrayList<>(); for (KubernetesMachine machine : machines.values()) { final CompletableFuture<Void> machineRunningFuture = machine.waitRunningAsync(); toCancelFutures.add(machineRunningFuture); final CompletableFuture<Void> machineBootChain = machineRunningFuture .thenComposeAsync(checkFailure(failure), executor) .thenRun(publishRunningStatus(machine)) .thenCompose(checkFailure(failure)) .thenCompose(bootstrap(toCancelFutures, machine)) .thenComposeAsync(checkFailure(failure), executor) .thenCompose(checkServers(toCancelFutures, machine)) .exceptionally(publishFailedStatus(failure, machine)); machinesFutures.add(machineBootChain); } waitMachines(machinesFutures, toCancelFutures, failure); } catch (InfrastructureException | RuntimeException | InterruptedException e) { LOG.warn( "Failed to start Kubernetes runtime of workspace {}. Cause: {}", workspaceId, e.getMessage()); boolean interrupted = Thread.interrupted() || e instanceof InterruptedException; probeScheduler.cancel(workspaceId); try { namespace.cleanUp(); } catch (InfrastructureException ignored) { } if (interrupted) { throw new InfrastructureException("Kubernetes environment start was interrupted"); } wrapAndRethrow(e); } }