From 5393ce7d02bb73ce4760edefa959dfb4846f1958 Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Tue, 2 Apr 2024 11:19:06 +0000
Subject: [PATCH 44/69] set oomkilled in cri

Signed-off-by: jikai <jikai11@huawei.com>
---
 src/daemon/common/cri/v1/v1_cri_helpers.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/daemon/common/cri/v1/v1_cri_helpers.cc b/src/daemon/common/cri/v1/v1_cri_helpers.cc
index a3488894..ea5c8bb5 100644
--- a/src/daemon/common/cri/v1/v1_cri_helpers.cc
+++ b/src/daemon/common/cri/v1/v1_cri_helpers.cc
@@ -506,6 +506,9 @@ void UpdateBaseStatusFromInspect(
         } else { // Case 3
             state = runtime::v1::CONTAINER_CREATED;
         }
+        if (inspect->state->oom_killed == true) {
+            reason = "OOMKilled";
+        }
         if (inspect->state->error != nullptr) {
             message = inspect->state->error;
         }
-- 
2.34.1

