56 lines
2.1 KiB
Diff
56 lines
2.1 KiB
Diff
From bd64c224c588a4aea6ff8f28ffa3285d7dcf296b Mon Sep 17 00:00:00 2001
|
|
From: jikai <jikai11@huawei.com>
|
|
Date: Mon, 22 Jan 2024 20:19:29 +0800
|
|
Subject: [PATCH 189/198] do not update rootfs mnt and umask annotations
|
|
|
|
Signed-off-by: jikai <jikai11@huawei.com>
|
|
---
|
|
src/daemon/modules/service/service_container.c | 4 ++--
|
|
src/daemon/modules/spec/specs.c | 15 ++-------------
|
|
2 files changed, 4 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/src/daemon/modules/service/service_container.c b/src/daemon/modules/service/service_container.c
|
|
index 99e94e81..d2802db0 100644
|
|
--- a/src/daemon/modules/service/service_container.c
|
|
+++ b/src/daemon/modules/service/service_container.c
|
|
@@ -688,8 +688,8 @@ static int do_oci_spec_update(const char *id, oci_runtime_spec *oci_spec, contai
|
|
char *cgroup_parent = NULL;
|
|
int ret;
|
|
|
|
- // First renew annotations for oci spec, cgroup path, rootfs.mount, native.mask
|
|
- // for iSulad daemon might get updated
|
|
+ // Renew annotations for oci spec, cgroup path only,
|
|
+ // since lxc uses the "cgroup.dir" in oci annotations to create cgroup
|
|
ret = update_spec_annotations(oci_spec, container_spec, hostconfig);
|
|
if (ret < 0) {
|
|
return -1;
|
|
diff --git a/src/daemon/modules/spec/specs.c b/src/daemon/modules/spec/specs.c
|
|
index 8a112496..781282f5 100644
|
|
--- a/src/daemon/modules/spec/specs.c
|
|
+++ b/src/daemon/modules/spec/specs.c
|
|
@@ -403,19 +403,8 @@ int update_spec_annotations(oci_runtime_spec *oci_spec, container_config *contai
|
|
return -1;
|
|
}
|
|
|
|
- /* add rootfs.mount */
|
|
- ret = add_rootfs_mount(container_spec);
|
|
- if (ret != 0) {
|
|
- ERROR("Failed to add rootfs mount");
|
|
- return -1;
|
|
- }
|
|
-
|
|
- /* add native.umask */
|
|
- ret = add_native_umask(container_spec);
|
|
- if (ret != 0) {
|
|
- ERROR("Failed to add native umask");
|
|
- return -1;
|
|
- }
|
|
+ // other annotations will either not be updated after containers created
|
|
+ // or for rootfs mnt and umask, we do not support the update operation
|
|
|
|
if (merge_annotations(oci_spec, container_spec)) {
|
|
return -1;
|
|
--
|
|
2.25.1
|
|
|