diff --git a/changelog.yaml b/changelog.yaml index d9e0b60..7a38e88 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -1,3 +1,6 @@ +v0.11.4: + fixes: + - "Failed probes (Unhealthy events) of a pod that is ready now are listed for information: the pod's state already reports NotReady and restarts. Deckhouse answers /readyz with 500 while it works through its queue after a module change and tolerates ten minutes of it; that badged its card after every module release." v0.11.3: fixes: - "A single FailedMount of a pod that is running and ready (kubelet failing to refresh a volume, such as a ConfigMap prometheus-operator deletes and recreates) is listed for information; it badges the card after five repeats in the window, like other events." diff --git a/images/cluster-map/src/internal/topology/problems.go b/images/cluster-map/src/internal/topology/problems.go index 3ef320a..e46bc7e 100644 --- a/images/cluster-map/src/internal/topology/problems.go +++ b/images/cluster-map/src/internal/topology/problems.go @@ -429,6 +429,15 @@ func eventProblems(s *problemSet, events []corev1.Event, podOwner map[string]str if eventBenign[p.Reason] || (!notable && p.Count < eventRepeats) { p.Severity = Info } + // A failed probe of a pod that is ready now: the pod's own state + // already says more. Deckhouse answers /readyz with 500 while it + // works through its queue after a module change, and its probe + // tolerates 10 minutes of that (failureThreshold 120); a NotReady + // pod is reported from its state, a failed liveness probe as a + // restart. + if p.Reason == "Unhealthy" && ready[pod] { + p.Severity = Info + } // the pod the latest event was about is gone: history, not state if p.Object != "" && !live[pod] { p.Severity = Info diff --git a/images/cluster-map/src/internal/topology/problems_test.go b/images/cluster-map/src/internal/topology/problems_test.go index d55448c..2c42c37 100644 --- a/images/cluster-map/src/internal/topology/problems_test.go +++ b/images/cluster-map/src/internal/topology/problems_test.go @@ -209,8 +209,14 @@ func TestRedirectIngressAndGonePods(t *testing.T) { attachProblems(g2, problemInputs{ pods: []corev1.Pod{{ObjectMeta: metav1.ObjectMeta{Name: "web-5f-live", Namespace: "shop", OwnerReferences: owned("ReplicaSet", "web-5f")}, Status: corev1.PodStatus{Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}}}}, - events: []corev1.Event{{Type: corev1.EventTypeWarning, Reason: "FailedMount", LastTimestamp: metav1.NewTime(t0), InvolvedObject: corev1.ObjectReference{Kind: "Pod", Namespace: "shop", Name: "web-5f-live"}}}, + events: []corev1.Event{ + {Type: corev1.EventTypeWarning, Reason: "FailedMount", LastTimestamp: metav1.NewTime(t0), InvolvedObject: corev1.ObjectReference{Kind: "Pod", Namespace: "shop", Name: "web-5f-live"}}, + {Type: corev1.EventTypeWarning, Reason: "Unhealthy", Count: 11, LastTimestamp: metav1.NewTime(t0), InvolvedObject: corev1.ObjectReference{Kind: "Pod", Namespace: "shop", Name: "web-5f-live"}}, + }, }) + if p := problemsOf(g2, "wl/shop/deployment/web")["Unhealthy"]; p.Severity != Info { + t.Errorf("failed probes of a pod that is ready must be information: %+v", p) + } if p := problemsOf(g2, "wl/shop/deployment/web")["FailedMount"]; p.Severity != Info { t.Errorf("one FailedMount of a ready pod must be information: %+v", p) }