summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-05-30 22:01:25 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2019-06-08 06:20:31 -0400
commit629017bb197bcda31ac129fb712ba3c6917b100b (patch)
tree0b425bd45a687ebff4a7b1e13b797237cb0dbde0 /cmd/podman
parent6109de4b933aac368fa6ff73330abe3cea7ce837 (diff)
downloadpodman-629017bb197bcda31ac129fb712ba3c6917b100b.tar.gz
podman-629017bb197bcda31ac129fb712ba3c6917b100b.tar.bz2
podman-629017bb197bcda31ac129fb712ba3c6917b100b.zip
When you change the storage driver we ignore the storage-options
The storage driver and the storage options in storage.conf should match, but if you change the storage driver via the command line then we need to nil out the default storage options from storage.conf. If the user wants to change the storage driver and use storage options, they need to specify them on the command line. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/libpodruntime/runtime.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go
index 898c81515..d83a71250 100644
--- a/cmd/podman/libpodruntime/runtime.go
+++ b/cmd/podman/libpodruntime/runtime.go
@@ -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