summaryrefslogtreecommitdiff
path: root/0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-09-03 03:24:28 +0000
committerCoprDistGit <infra@openeuler.org>2024-09-03 03:24:28 +0000
commite45819fcb4a96649a4030db7684f140d5ca46735 (patch)
tree544dac3e30a0448eabdc50add41aa3a18982d9f1 /0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch
parent1a71e3afebb4b43be63949dcc8e882fe7643f13b (diff)
automatic import of iSuladopeneuler24.03_LTS
Diffstat (limited to '0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch')
-rw-r--r--0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch b/0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch
new file mode 100644
index 0000000..1d9b3a3
--- /dev/null
+++ b/0053-remove-container-root-path-in-rt_lcr_rm-if-lcr-runti.patch
@@ -0,0 +1,33 @@
+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
+