Skip to content

Commit

Permalink
Do not relabel if user did not request it for non local volumes
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Mar 1, 2016
1 parent 8ae0192 commit 843a119
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
// bind.Name is an already existing volume, we need to use that here
bind.Driver = v.DriverName()
bind.Named = true
bind = setBindModeIfNull(bind)
if bind.Driver == "local" {
bind = setBindModeIfNull(bind)
}
}
if label.RelabelNeeded(bind.Mode) {
if err := label.Relabel(bind.Source, container.MountLabel, label.IsShared(bind.Mode)); err != nil {
Expand Down

0 comments on commit 843a119

Please sign in to comment.