代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/iSulad 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 1d51e3e9f14199854cc2d586651c5809345aee18 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Wed, 8 May 2024 14:48:47 +0800
Subject: [PATCH 82/85] fix shim controller set incorrect sandbox status state
Signed-off-by: jikai <jikai11@huawei.com>
---
src/daemon/sandbox/controller/controller.h | 3 +++
src/daemon/sandbox/controller/shim/shim_controller.cc | 6 ++++--
src/daemon/sandbox/sandbox.cc | 3 ---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/daemon/sandbox/controller/controller.h b/src/daemon/sandbox/controller/controller.h
index f479a0ac..9ad45855 100644
--- a/src/daemon/sandbox/controller/controller.h
+++ b/src/daemon/sandbox/controller/controller.h
@@ -27,6 +27,9 @@
namespace sandbox {
+#define SANDBOX_READY_STATE_STR "SANDBOX_READY"
+#define SANDBOX_NOTREADY_STATE_STR "SANDBOX_NOTREADY"
+
struct ControllerMountInfo {
std::string source;
std::string destination;
diff --git a/src/daemon/sandbox/controller/shim/shim_controller.cc b/src/daemon/sandbox/controller/shim/shim_controller.cc
index 4da637c7..ce09c076 100644
--- a/src/daemon/sandbox/controller/shim/shim_controller.cc
+++ b/src/daemon/sandbox/controller/shim/shim_controller.cc
@@ -446,8 +446,10 @@ void ShimController::InspectResponseToSandboxStatus(container_inspect *inspect,
sandboxStatus.id = inspect->id;
if (inspect->state != nullptr) {
sandboxStatus.pid = inspect->state->pid;
- if (inspect->state->status != nullptr) {
- sandboxStatus.state = std::string(inspect->state->status);
+ if (inspect->state->running) {
+ sandboxStatus.state = std::string(SANDBOX_READY_STATE_STR);
+ } else {
+ sandboxStatus.state = std::string(SANDBOX_NOTREADY_STATE_STR);
}
}
diff --git a/src/daemon/sandbox/sandbox.cc b/src/daemon/sandbox/sandbox.cc
index 279bf628..d44abb99 100644
--- a/src/daemon/sandbox/sandbox.cc
+++ b/src/daemon/sandbox/sandbox.cc
@@ -39,9 +39,6 @@
#include "utils_timestamp.h"
#include "mailbox.h"
-#define SANDBOX_READY_STATE_STR "SANDBOX_READY"
-#define SANDBOX_NOTREADY_STATE_STR "SANDBOX_NOTREADY"
-
namespace sandbox {
const std::string SHM_MOUNT_POINT = "/dev/shm";
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。