verifyVolumesInfo needs a container lock
It operates on containers that have already been registered on the daemon, and are visible to other goroutines. Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
This commit is contained in:
parent
03aa24721c
commit
201a37f7a1
|
@ -137,6 +137,9 @@ func migrateVolume(id, vfs string) error {
|
||||||
// verifyVolumesInfo ports volumes configured for the containers pre docker 1.7.
|
// verifyVolumesInfo ports volumes configured for the containers pre docker 1.7.
|
||||||
// It reads the container configuration and creates valid mount points for the old volumes.
|
// It reads the container configuration and creates valid mount points for the old volumes.
|
||||||
func (daemon *Daemon) verifyVolumesInfo(container *container.Container) error {
|
func (daemon *Daemon) verifyVolumesInfo(container *container.Container) error {
|
||||||
|
container.Lock()
|
||||||
|
defer container.Unlock()
|
||||||
|
|
||||||
// Inspect old structures only when we're upgrading from old versions
|
// Inspect old structures only when we're upgrading from old versions
|
||||||
// to versions >= 1.7 and the MountPoints has not been populated with volumes data.
|
// to versions >= 1.7 and the MountPoints has not been populated with volumes data.
|
||||||
type volumes struct {
|
type volumes struct {
|
||||||
|
|
Loading…
Reference in New Issue