aboutsummaryrefslogtreecommitdiff
path: root/pkg/spec/createconfig.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-09-07 10:40:31 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-07 17:50:58 +0000
commitccc4a339cd124abc668b7542a9eb838cd7d1b214 (patch)
tree707e6d031497be7b82b745e7a5f9d126e7a8ed6c /pkg/spec/createconfig.go
parent2e89e5a204dd99a2bfff25c97fa2f4583c0a3ae1 (diff)
downloadpodman-ccc4a339cd124abc668b7542a9eb838cd7d1b214.tar.gz
podman-ccc4a339cd124abc668b7542a9eb838cd7d1b214.tar.bz2
podman-ccc4a339cd124abc668b7542a9eb838cd7d1b214.zip
Respect user-added mounts over default spec mounts
When there was a conflict between a user-added volume and a mount already in the spec, we previously respected the mount already in the spec and discarded the user-added mount. This is counter to expected behavior - if I volume-mount /dev into the container, I epxect it will override the default /dev in the container, and not be ignored. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1419 Approved by: TomSweeneyRedHat
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r--pkg/spec/createconfig.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 486281200..0ab0bb9ff 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -160,9 +160,6 @@ func (c *CreateConfig) GetVolumeMounts(specMounts []spec.Mount) ([]spec.Mount, e
if len(spliti) > 2 {
options = strings.Split(spliti[2], ",")
}
- if libpod.MountExists(specMounts, spliti[1]) {
- continue
- }
options = append(options, "rbind")
for _, opt := range options {
switch opt {
@@ -201,6 +198,8 @@ func (c *CreateConfig) GetVolumeMounts(specMounts []spec.Mount) ([]spec.Mount, e
Source: spliti[0],
Options: options,
})
+
+ logrus.Debugf("User mount %s:%s options %v", spliti[0], spliti[1], options)
}
// volumes from image config