Chun-Hung Hsiao created MESOS-9019:
--------------------------------------
Summary: Validate that container paths are unique in
`ContainerInfo.volumes`.
Key: MESOS-9019
URL: https://issues.apache.org/jira/browse/MESOS-9019
Project: Mesos
Issue Type: Improvement
Components: containerization
Reporter: Chun-Hung Hsiao
Currently we allow two volumes to have the same {{container_path}}. The
bind-mount of a later volume would overwrite that of an earlier one.
However, if the two volumes are file-based secrets, the containerizer will
generate pre-exec commands similar to the following:
{noformat}
mv -f secret1 source
mount -n --rbind source container_path
mv -f secret2 source
mount -n --rbind source container_path
{noformat}
The second {{mv}} would rename {{secret2}} to {{source}}, but {{target}}
remains bounded to the gone {{secret1}}, and this would make the last {{mount}}
result in an {{ENOENT}}.
In general, allowing multiple with the same {{container_path}} is not useful,
so we should disallow it and validate that in advance instead of getting a
failure during container launch.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)