Skip to content

Commit

Permalink
Only warn about 'driver' not being set if the priority list is unset
Browse files Browse the repository at this point in the history
Currently we would display an error when the user does not specify a `driver` in
their config file. This has been present for historical reasons mostly to
prevent users from accidentally getting the vfs
driver (#1460 (comment)). Now
that most systems support the overlay driver natively, we can reduce this to a
warning and only warn about it if the driver_priority list is unset. If it is
provided, then clearly the user or the distribution wanted for c/storage to pick
a driver itself and the warning would be only confusing to users.

Signed-off-by: Dan Čermák <dcermak@suse.com>
  • Loading branch information
dcermak committed Jan 6, 2023
1 parent 881ac48 commit fbe44c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) erro
logrus.Warnf("Switching default driver from overlay2 to the equivalent overlay driver")
storeOptions.GraphDriverName = overlayDriver
}
if storeOptions.GraphDriverName == "" {
logrus.Errorf("The storage 'driver' option must be set in %s to guarantee proper operation", configFile)
if storeOptions.GraphDriverName == "" && len(storeOptions.GraphDriverPriority) == 0 {
logrus.Warnf("The storage 'driver' option should be set in %s. A driver was picked automatically.", configFile)
}
storeOptions.GraphDriverPriority = config.Storage.DriverPriority
if config.Storage.RunRoot != "" {
Expand Down

0 comments on commit fbe44c0

Please sign in to comment.