fix 2 potential panics with mounts in swarm
Signed-off-by: Victor Vieux <vieux@docker.com> Upstream-commit: ffeb9fcb2a155f3495be333f9c6df41ea14c809b Component: engine
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ func (c *containerAdapter) createVolumes(ctx context.Context, backend executorpk
|
||||
continue
|
||||
}
|
||||
|
||||
if mount.VolumeOptions != nil {
|
||||
if mount.VolumeOptions == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user