Probe all drivers if volume driver not specified

This fixes an issue where `docker run -v foo:/bar --volume-driver
<remote driver>` -> daemon restart -> `docker run -v foo:/bar` would
make a `local` volume after the restart instead of using the existing
volume from the remote driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 00ec6102d993a752bd8dfb4ee393a4e58e59a4fe
Component: engine
This commit is contained in:
Brian Goff
2016-02-10 20:43:15 -05:00
parent f6ab952c46
commit 13ec79c31c
5 changed files with 28 additions and 7 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
return derr.ErrorCodeMountDup.WithArgs(bind.Destination)
}
if len(bind.Name) > 0 && len(bind.Driver) > 0 {
if len(bind.Name) > 0 {
// create the volume
v, err := daemon.volumes.CreateWithRef(bind.Name, bind.Driver, container.ID, nil)
if err != nil {