From a87233af86680abb95a587b1a9451662626e6524 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Mon, 30 Mar 2026 16:21:40 +0800 Subject: [PATCH] fix(host): get pod status by primary container status (#24583) --- pkg/hostman/guestman/pod_helper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/hostman/guestman/pod_helper.go b/pkg/hostman/guestman/pod_helper.go index 0d6612b9d9..fc4a4aa5f8 100644 --- a/pkg/hostman/guestman/pod_helper.go +++ b/pkg/hostman/guestman/pod_helper.go @@ -238,11 +238,11 @@ func (t *localPodRestartTask) Dump() string { } func GetPodStatusByContainerStatus(status string, cStatus string, isPrimary bool) string { - if cStatus == computeapi.CONTAINER_STATUS_CRASH_LOOP_BACK_OFF { + if cStatus == computeapi.CONTAINER_STATUS_CRASH_LOOP_BACK_OFF && isPrimary { status = computeapi.POD_STATUS_CRASH_LOOP_BACK_OFF } if cStatus == computeapi.CONTAINER_STATUS_EXITED && status != computeapi.VM_READY { - status = computeapi.POD_STATUS_CONTAINER_EXITED + // status = computeapi.POD_STATUS_CONTAINER_EXITED if isPrimary { status = computeapi.VM_READY }