mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
fix(host): get pod status by primary container status (#24583)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user