diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-05-21 10:16:02 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-05-21 10:21:21 -0400 |
commit | 57e38e9550406d99dbad169d3ad4e571310e7842 (patch) | |
tree | 87a904f9fca1b628083f6e7cc1719a9f33cabe45 /libpod/mounts_linux.go | |
parent | 773b9ac9d059a66280ac50163a17bc705bde0a60 (diff) | |
download | podman-57e38e9550406d99dbad169d3ad4e571310e7842.tar.gz podman-57e38e9550406d99dbad169d3ad4e571310e7842.tar.bz2 podman-57e38e9550406d99dbad169d3ad4e571310e7842.zip |
When superceding mounts, check for opposite types
When we supercede low-priority mounts and volumes (image volumes,
and volumes sourced from --volumes-from) with higher-priority
ones (the --volume and --mount flags), we always replaced
lower-priority mounts of the same type (e.g. a user mount to
/tmp/test1 would supercede a volumes-from mount to the same
destination). However, we did not supercede the opposite type - a
named volume from image volumes at /tmp/test1 would be allowed to
remain and create a conflict, preventing container creation.
Solve this by destroying opposite types before merging (we can't
do it in the same loop, as then named volumes, which go second,
might trample changes made by mounts).
Fixes #3174
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/mounts_linux.go')
0 files changed, 0 insertions, 0 deletions