You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(k8s): add warning log for partially degraded logs collector pods
Surface partial pod failures in the logs collector DaemonSet via a
warning log instead of silently reporting Running when some pods are
stopped.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: container-engine-lib/lib/backend_impls/kubernetes/kubernetes_kurtosis_backend/logs_collector_functions/shared_helpers.go
returncontainer.ContainerStatus_Stopped, stacktrace.NewError("No pods managed by logs collector daemon set were found. There should be at least one. This is likely a bug in Kurtosis.")
returncontainer.ContainerStatus_Stopped, stacktrace.Propagate(err, "An error occurred retrieving container status for a pod managed by logs collectors collector daemon set '%v' with name: %v\n", logsCollectorDaemonSet.Name, pod.Name)
289
291
}
290
292
291
293
ifpodStatus==container.ContainerStatus_Running {
292
-
hasRunningPod=true
294
+
runningPods++
295
+
} else {
296
+
stoppedPods++
293
297
}
294
298
}
295
299
296
-
if!hasRunningPod {
300
+
ifrunningPods==0 {
297
301
returncontainer.ContainerStatus_Stopped, nil
298
302
}
299
303
304
+
ifstoppedPods>0 {
305
+
logrus.Warnf("Logs collector daemon set '%v' has %d stopped pods out of %d total pods. The collector is partially degraded.", logsCollectorDaemonSet.Name, stoppedPods, len(logsCollectorPods))
0 commit comments