Skip to content

Commit

Permalink
Merge pull request containers#3240 from rhatdan/storageopts
Browse files Browse the repository at this point in the history
When you change the storage driver we ignore the storage-options
  • Loading branch information
openshift-merge-robot authored Jun 10, 2019
2 parents a89d013 + 629017b commit c93b8d6
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
3 changes: 3 additions & 0 deletions cmd/podman/libpodruntime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ func getRuntime(ctx context.Context, c *cliconfig.PodmanCommand, renumber bool,
if c.Flags().Changed("storage-driver") {
storageSet = true
storageOpts.GraphDriverName = c.GlobalFlags.StorageDriver
// Overriding the default storage driver caused GraphDriverOptions from storage.conf to be ignored
storageOpts.GraphDriverOptions = []string{}
}
// This should always be checked after storage-driver is checked
if len(c.GlobalFlags.StorageOpts) > 0 {
storageSet = true
storageOpts.GraphDriverOptions = c.GlobalFlags.StorageOpts
Expand Down
3 changes: 2 additions & 1 deletion libpod/container_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ func (c *Container) setupStorage(ctx context.Context) error {
}
return false
}
defOptions, err := storage.GetDefaultMountOptions()

defOptions, err := storage.GetMountOptions(c.runtime.store.GraphDriverName(), c.runtime.store.GraphOptions())
if err != nil {
return errors.Wrapf(err, "error getting default mount options")
}
Expand Down
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ github.com/containers/image 2c0349c99af7d90694b3faa0e9bde404d407b145
github.com/vbauerster/mpb v3.3.4
github.com/mattn/go-isatty v0.0.4
github.com/VividCortex/ewma v1.1.1
github.com/containers/storage 9b10041d7b2ef767ce9c42b5862b6c51eeb82214
github.com/containers/storage v1.12.10
github.com/containers/psgo v1.3.0
github.com/coreos/go-systemd v17
github.com/coreos/pkg v4
Expand Down
10 changes: 8 additions & 2 deletions vendor/github.com/containers/storage/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions vendor/github.com/containers/storage/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c93b8d6

Please sign in to comment.