提交 06531129 编写于 作者: L LiuHao

iSulad: ignore shared shm of system container

Signed-off-by: NLiuHao <liuhao27@huawei.com>
上级 8c693e75
%global _version 1.1.12
%global _release 20200311.212052.git8d13b09e
%global _release 20200317.200806.git18c7747a
%global is_systemd 1
%global debug_package %{nil}
......
......@@ -96,6 +96,18 @@
"ro"
]
},
{
"destination": "/dev/shm",
"type": "tmpfs",
"source": "shm",
"options": [
"nosuid",
"noexec",
"nodev",
"mode=1777",
"size=65536k"
]
},
{
"destination": "/sys/fs/cgroup",
"type": "cgroup",
......
......@@ -603,6 +603,10 @@ void umount_share_shm(container_t *cont)
if (cont->hostconfig == NULL) {
return;
}
// ignore shm of system container
if (cont->hostconfig->system_container) {
return;
}
if (cont->hostconfig->ipc_mode == NULL || is_shareable(cont->hostconfig->ipc_mode)) {
if (cont->common_config == NULL || cont->common_config->shm_path == NULL) {
return;
......
......@@ -2276,6 +2276,10 @@ static int setup_ipc_dirs(oci_runtime_spec *oci_spec, host_config *host_spec,
char *tmp_cid = NULL;
char *right_path = NULL;
// ignore shm of system container
if (host_spec->system_container) {
return 0;
}
// setup shareable dirs
if (host_spec->ipc_mode == NULL || is_shareable(host_spec->ipc_mode)) {
return prepare_share_shm(oci_spec, host_spec, v2_spec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册