提交 e9db5ad4 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!172 iSulad: fix merge order of mount

Merge pull request !172 from lifeng_isula/fix_embedded
......@@ -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.
先完成此消息的编辑!
想要评论请 注册