9 Star 5 Fork 47

src-openEuler/iSulad

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
liuxu 提交于 2024-04-20 10:00 +08:00 . upgrade from upstream
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/iSulad.git
git@gitee.com:src-openeuler/iSulad.git
src-openeuler
iSulad
iSulad
master

搜索帮助