提交 2425fb49 编写于 作者: L LiFeng

iSulad: fix merge order of mount

Signed-off-by: NLiFeng <lifeng68@huawei.com>
上级 d2eedf57
......@@ -2317,6 +2317,17 @@ int merge_conf_mounts(oci_runtime_spec *oci_spec, host_config *host_spec,
int ret = 0;
container_config *container_spec = v2_spec->config;
/* mounts to mount filesystem */
if (container_spec->mounts && container_spec->mounts_len) {
ret = merge_volumes(oci_spec, container_spec->mounts,
container_spec->mounts_len, v2_spec,
parse_mount);
if (ret) {
ERROR("Failed to merge mounts");
goto out;
}
}
/* volumes to mount */
if (host_spec->binds != NULL && host_spec->binds_len) {
ret = merge_volumes(oci_spec, host_spec->binds,
......@@ -2336,17 +2347,6 @@ int merge_conf_mounts(oci_runtime_spec *oci_spec, host_config *host_spec,
}
}
/* mounts to mount filesystem */
if (container_spec->mounts && container_spec->mounts_len) {
ret = merge_volumes(oci_spec, container_spec->mounts,
container_spec->mounts_len, v2_spec,
parse_mount);
if (ret) {
ERROR("Failed to merge mounts");
goto out;
}
}
if (host_spec->shm_size == 0) {
host_spec->shm_size = DEFAULT_SHM_SIZE;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册