30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
From 5721206da703bf827cd125feb8f9bf518f10f69c Mon Sep 17 00:00:00 2001
|
|
From: zhongtao <zhongtao17@huawei.com>
|
|
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 <zhongtao17@huawei.com>
|
|
---
|
|
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
|
|
|