Skip to content

Commit

Permalink
Only override the graphdriver to vfs if the priority is unset
Browse files Browse the repository at this point in the history
This is an amend to containers#1460

That PR was not addressing the case when the system wide config had the
driver_priority option configured and the user had no config file of their
own. Then `getRootlessStorageOpts` would be called and it would override the
graph driver to "vfs".

With this commit we only override the graph driver if driver priority is
empty. Otherwise we propagate the driver priority into the storage options, so
that the driver autodetection works as expected.

Signed-off-by: Dan Čermák <dcermak@suse.com>
  • Loading branch information
dcermak committed Jan 16, 2023
1 parent e778f8b commit df0cb32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ func getRootlessStorageOpts(rootlessUID int, systemOpts StoreOptions) (StoreOpti
}
}
if opts.GraphDriverName == "" {
opts.GraphDriverName = "vfs"
if len(systemOpts.GraphDriverPriority) == 0 {
opts.GraphDriverName = "vfs"
} else {
opts.GraphDriverPriority = systemOpts.GraphDriverPriority
}
}

if os.Getenv("STORAGE_OPTS") != "" {
Expand Down

0 comments on commit df0cb32

Please sign in to comment.