代码拉取完成,页面将自动刷新
From 0cb96d50302f9f3ad1c17e0bb650ac37db4d5206 Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Wed, 10 Apr 2024 08:41:46 +0000
Subject: [PATCH 53/69] remove container root path in rt_lcr_rm if lcr runtime
missing
Signed-off-by: jikai <jikai11@huawei.com>
---
src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c b/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c
index 6b862958..978da079 100644
--- a/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c
+++ b/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c
@@ -238,7 +238,13 @@ int rt_lcr_rm(const char *name, const char *runtime, const rt_rm_params_t *param
engine_ops = engines_get_handler(runtime);
if (engine_ops == NULL || engine_ops->engine_delete_op == NULL) {
- ERROR("Failed to get engine delete operations");
+ // if engine_ops is NULL, container root path may have been corrupted, try to remove by daemon
+ // If user runs container with lcr but remove lcr runtime after, there might be resources remaining
+ ERROR("Failed to get engine delete operations, container %s root path may have been corrupted, try to remove by daemon", name);
+ if (remove_container_rootpath(name, params->rootpath) == 0) {
+ ret = 0;
+ goto out;
+ }
ret = -1;
goto out;
}
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。