Merge pull request #23523 from vieux/fix_mounts_swarm

fix 2 potential panics with mounts in swarm
This commit is contained in:
Brian Goff 2016-06-14 14:44:19 -04:00 committed by GitHub
commit 87f31e379d
2 changed files with 4 additions and 1 deletions

View File

@ -154,6 +154,9 @@ func (m *MountOpt) Set(value string) error {
Labels: make(map[string]string),
}
}
if mount.VolumeOptions.DriverConfig == nil {
mount.VolumeOptions.DriverConfig = &swarm.Driver{}
}
return mount.VolumeOptions
}

View File

@ -192,7 +192,7 @@ func (c *containerAdapter) createVolumes(ctx context.Context, backend executorpk
continue
}
if mount.VolumeOptions != nil {
if mount.VolumeOptions == nil {
continue
}