mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00
Warn on overriding user-specified storage driver w/ DB
Overriding storage.conf is not intuitive behavior, so pop up an error message when it happens, so people know that bad things are happening. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -511,6 +511,11 @@ func makeRuntime(runtime *Runtime) (err error) {
|
||||
|
||||
// Reset defaults if they were not explicitly set
|
||||
if !runtime.configuredFrom.storageGraphDriverSet && dbConfig.GraphDriver != "" {
|
||||
if runtime.config.StorageConfig.GraphDriverName != dbConfig.GraphDriver &&
|
||||
runtime.config.StorageConfig.GraphDriverName != "" {
|
||||
logrus.Errorf("User-selected graph driver %s overwritten by graph driver %s from database - delete libpod local files to resolve",
|
||||
runtime.config.StorageConfig.GraphDriverName, dbConfig.GraphDriver)
|
||||
}
|
||||
runtime.config.StorageConfig.GraphDriverName = dbConfig.GraphDriver
|
||||
}
|
||||
if !runtime.configuredFrom.storageGraphRootSet && dbConfig.StorageRoot != "" {
|
||||
|
Reference in New Issue
Block a user