refactor(kubernetes): simplify cleanLogsCollector to skip if daemonset is not found#2915
Open
barnabasbusa wants to merge 2 commits intomainfrom
Open
refactor(kubernetes): simplify cleanLogsCollector to skip if daemonset is not found#2915barnabasbusa wants to merge 2 commits intomainfrom
barnabasbusa wants to merge 2 commits intomainfrom
Conversation
…t is not found refactor(kubernetes): treat logs collector as stopped if no pods are found for daemonset
tedim52
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary: Fix kurtosis clean -a hanging on k8s clusters with tainted/unhealthy nodes
Problem
kurtosis clean -a hangs indefinitely on Kubernetes clusters where some nodes have taints (e.g. DiskPressure, smc). The fluentbit logs collector
Clean method creates remove-dir-pod cleanup pods targeted at each node, but nodes with taints won't schedule these pods. The waitForPodAvailability
function then blocks for 15 minutes per unschedulable pod, and this happens sequentially per node.
Changes (5 files, +46/-19)
- Respects context cancellation (was ignoring ctx.Done())
- Detects PodReasonUnschedulable and returns immediately instead of waiting 15 minutes
- Returns nil instead of error when zero pods found
- Makes WaitForPodTermination best-effort (warn, don't fail)
- Makes RemoveDirPathFromNode best-effort with 2-minute per-node timeout (skips tainted nodes)
- Makes waitForAtLeastOneActivePodManagedByDaemonSet best-effort
warnings
- namespace.Namespace → namespace.Name (was always empty for k8s Namespace objects, causing cross-namespace service account lookups and "found 2"
errors)
- Zero pods case returns Stopped status with warning instead of error
Result
kurtosis clean -a completes in ~40 seconds even with tainted/unhealthy nodes, instead of hanging indefinitely.