diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-01-02 12:54:54 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-01-02 12:54:54 -0500 |
commit | a36006c2dcc40c62e05766e913cc8dc89602785c (patch) | |
tree | 088bbca511d7ce0c118e5701fb3efc546f959d8d /libpod | |
parent | e796f522f6b74a9fef16976709e773f6395ef5e2 (diff) | |
download | podman-a36006c2dcc40c62e05766e913cc8dc89602785c.tar.gz podman-a36006c2dcc40c62e05766e913cc8dc89602785c.tar.bz2 podman-a36006c2dcc40c62e05766e913cc8dc89602785c.zip |
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>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 2dfebf565..f390824dc 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -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 != "" { |