Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com> (cherry picked from commit 9c3acba9915c23718ae8a806daa49022a73756eb)
44 lines
1.7 KiB
Diff
44 lines
1.7 KiB
Diff
From 5a6112a35daa7229ffb03d0dbb1df0bd1dba3469 Mon Sep 17 00:00:00 2001
|
|
From: haozi007 <liuhao27@huawei.com>
|
|
Date: Thu, 16 Mar 2023 19:16:30 +0800
|
|
Subject: [PATCH 29/46] improve check of process failure
|
|
|
|
1. fix docs error;
|
|
2. check error to decrease Unnecessary process;
|
|
|
|
Signed-off-by: haozi007 <liuhao27@huawei.com>
|
|
---
|
|
docs/cri_pod_manager_design.md | 2 +-
|
|
src/daemon/entry/cri/cri_container_manager_service_impl.cc | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/docs/cri_pod_manager_design.md b/docs/cri_pod_manager_design.md
|
|
index aa7ac165..91d74f5a 100644
|
|
--- a/docs/cri_pod_manager_design.md
|
|
+++ b/docs/cri_pod_manager_design.md
|
|
@@ -263,7 +263,7 @@ PodSandboxManagerServiceImpl::PodSandboxStatus(const std::string &podSandboxID,
|
|
}
|
|
```
|
|
|
|
-详细的代码走读,代码流程图在 [StopPod代码走读中](#stoppodsandbox) 中进行了详细的分析,可以参考对应的部分。
|
|
+详细的代码走读,代码流程图在 [StopPod代码走读](#stoppodsandbox) 中进行了详细的分析,可以参考对应的部分。
|
|
|
|
## 通用接口
|
|
|
|
diff --git a/src/daemon/entry/cri/cri_container_manager_service_impl.cc b/src/daemon/entry/cri/cri_container_manager_service_impl.cc
|
|
index 93b939c9..0fc1884f 100644
|
|
--- a/src/daemon/entry/cri/cri_container_manager_service_impl.cc
|
|
+++ b/src/daemon/entry/cri/cri_container_manager_service_impl.cc
|
|
@@ -730,7 +730,7 @@ void ContainerManagerServiceImpl::PackContainerStatsAttributes(
|
|
|
|
container->mutable_attributes()->set_id(id);
|
|
auto status = ContainerStatus(std::string(id), error);
|
|
- if (status == nullptr) {
|
|
+ if (error.NotEmpty()) {
|
|
return;
|
|
}
|
|
|
|
--
|
|
2.25.1
|
|
|