1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/volume
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
..
drivers fix typos 2016-07-25 23:18:15 -07:00
local Fix volume not working after daemon restart 2016-08-17 20:17:09 -07:00
store plugins: experimental support for new plugin management 2016-06-14 14:20:27 -07:00
testutils Add support for volume scopes 2016-06-05 15:37:15 -04:00
volume.go Change mount-types to lowercase 2016-07-25 23:16:28 -07:00
volume_copy.go Add explicit flags for volume cp/no-cp 2016-03-21 20:38:44 -04:00
volume_propagation_linux.go fix some typos. 2016-03-10 10:09:27 +08:00
volume_propagation_linux_test.go Remove static errors from errors package. 2016-02-26 15:49:09 -05:00
volume_propagation_unsupported.go fix some typos. 2016-03-10 10:09:27 +08:00
volume_test.go Windows: Remove TP4 support from test code 2016-04-11 15:36:31 -07:00
volume_unix.go Add explicit flags for volume cp/no-cp 2016-03-21 20:38:44 -04:00
volume_windows.go Windows: Support RO volumes 14350+ 2016-06-07 14:55:36 -07:00