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 13, 2023
1 parent e778f8b commit e028490
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,10 @@ func getRootlessStorageOpts(rootlessUID int, systemOpts StoreOptions) (StoreOpti
}
}
}
if opts.GraphDriverName == "" {
if opts.GraphDriverName == "" && len(systemOpts.GraphDriverPriority) == 0 {
opts.GraphDriverName = "vfs"
} else {
opts.GraphDriverPriority = systemOpts.GraphDriverPriority
}

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

0 comments on commit e028490

Please sign in to comment.