Skip to content

Commit

Permalink
Merge pull request moby#23523 from vieux/fix_mounts_swarm
Browse files Browse the repository at this point in the history
fix 2 potential panics with mounts in swarm
  • Loading branch information
cpuguy83 committed Jun 14, 2016
2 parents f0e8952 + ffeb9fc commit 87f31e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions api/client/service/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion daemon/cluster/executor/container/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (c *containerAdapter) createVolumes(ctx context.Context, backend executorpk
continue
}

if mount.VolumeOptions != nil {
if mount.VolumeOptions == nil {
continue
}

Expand Down

0 comments on commit 87f31e3

Please sign in to comment.