1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/volume/local
Brian Goff e8ed523480 Fix volume not working after daemon restart
When the daemon is started, it looks at all the volumes and checks to
see if any of them have mount options persisted to disk, and loads them
from disk if it does.

In some cases a volume will be created with an empty map causing the
options file to be persisted and volume options set to a non-nil value
on daemon restart... this causes problems later when the driver checks
for a non-nil value to determine if it should try and mount with the
persisted volume options.

Ensures 2 things:

1. Instead of only checking nilness for the opts map, use `len` to make
sure it is not an empty map, which we don't really need to persit.

2. An empty (or nulled) opts.json will not inadvertnatly set volume
options on daemon restart.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 246d1eb58e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-17 20:17:09 -07:00
..
local.go Fix volume not working after daemon restart 2016-08-17 20:17:09 -07:00
local_test.go Fix volume not working after daemon restart 2016-08-17 20:17:09 -07:00
local_unix.go Get the Docker Engine to build clean on Solaris 2016-05-23 16:37:12 -07:00
local_windows.go Support mount opts for local volume driver 2016-03-03 10:32:25 -05:00