summaryrefslogtreecommitdiff
path: root/0062-do-not-umount-shmpath-for-sandbox-container.patch
blob: 8b719a3f003e3d3ae60f194fc653d7deed3a2652 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 8e35525073b52b5d161984015de641bd21570380 Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Tue, 16 Apr 2024 10:32:50 +0000
Subject: [PATCH 62/69] do not umount shmpath for sandbox container

Signed-off-by: jikai <jikai11@huawei.com>
---
 src/daemon/modules/service/service_container.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/daemon/modules/service/service_container.c b/src/daemon/modules/service/service_container.c
index eb7ce4f4..a2322309 100644
--- a/src/daemon/modules/service/service_container.c
+++ b/src/daemon/modules/service/service_container.c
@@ -1718,6 +1718,12 @@ void umount_share_shm(container_t *cont)
         return;
     }
     if (cont->hostconfig->ipc_mode == NULL || namespace_is_shareable(cont->hostconfig->ipc_mode)) {
+#ifdef ENABLE_CRI_API_V1
+        // For sandbox in cri v1, the shm path is created and umounted in CRI
+        if (is_sandbox_container(cont->common_config->sandbox_info)) {
+            return;
+        }
+#endif
         if (cont->common_config == NULL || cont->common_config->shm_path == NULL) {
             return;
         }
-- 
2.34.1