1 Star 0 Fork 43

zhongtao/src-iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0139-containers-in-paused-state-are-not-allowed-to-start.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
From 5721206da703bf827cd125feb8f9bf518f10f69c Mon Sep 17 00:00:00 2001
From: zhongtao <[email protected]>
Date: Mon, 14 Oct 2024 19:27:57 +0800
Subject: [PATCH 148/149] containers in paused state are not allowed to start
Signed-off-by: zhongtao <[email protected]>
---
src/daemon/executor/container_cb/execution.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/daemon/executor/container_cb/execution.c b/src/daemon/executor/container_cb/execution.c
index f924a208..2e54f085 100644
--- a/src/daemon/executor/container_cb/execution.c
+++ b/src/daemon/executor/container_cb/execution.c
@@ -584,6 +584,11 @@ static int container_start_cb(const container_start_request *request, container_
if (container_is_running(cont->state)) {
INFO("Container is already running");
+ if (container_is_paused(cont->state)) {
+ cc = ISULAD_ERR_EXEC;
+ ERROR("cannot start a paused container, try unpause instead");
+ isulad_set_error_message("cannot start a paused container, try unpause instead");
+ }
goto pack_response;
}
--
2.25.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/taotao-sauce/src-iSulad.git
[email protected]:taotao-sauce/src-iSulad.git
taotao-sauce
src-iSulad
src-iSulad
master

搜索帮助