diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-02-25 15:35:30 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-02-26 09:38:02 -0500 |
commit | 5a0a9dfa23900f0bf1c53cf5d6d34a665616129e (patch) | |
tree | b5f2f49b92e6962793cebe7bf92046affdabf33b /libpod | |
parent | 0d697573a6cd506f89c5631115f8322f1b6f84f3 (diff) | |
download | podman-5a0a9dfa23900f0bf1c53cf5d6d34a665616129e.tar.gz podman-5a0a9dfa23900f0bf1c53cf5d6d34a665616129e.tar.bz2 podman-5a0a9dfa23900f0bf1c53cf5d6d34a665616129e.zip |
Add debug information when overriding paths with the DB
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 6e250b7a0..eb9eb9e83 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -629,24 +629,43 @@ func makeRuntime(runtime *Runtime) (err error) { 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", + logrus.Errorf("User-selected graph driver %q overwritten by graph driver %q 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 != "" { + if runtime.config.StorageConfig.GraphRoot != dbConfig.StorageRoot && + runtime.config.StorageConfig.GraphRoot != "" { + logrus.Debugf("Overriding graph root %q with %q from database", + runtime.config.StorageConfig.GraphRoot, dbConfig.StorageRoot) + } runtime.config.StorageConfig.GraphRoot = dbConfig.StorageRoot } if !runtime.configuredFrom.storageRunRootSet && dbConfig.StorageTmp != "" { + if runtime.config.StorageConfig.RunRoot != dbConfig.StorageTmp && + runtime.config.StorageConfig.RunRoot != "" { + logrus.Debugf("Overriding run root %q with %q from database", + runtime.config.StorageConfig.RunRoot, dbConfig.StorageTmp) + } runtime.config.StorageConfig.RunRoot = dbConfig.StorageTmp } if !runtime.configuredFrom.libpodStaticDirSet && dbConfig.LibpodRoot != "" { + if runtime.config.StaticDir != dbConfig.LibpodRoot && runtime.config.StaticDir != "" { + logrus.Debugf("Overriding static dir %q with %q from database", runtime.config.StaticDir, dbConfig.LibpodRoot) + } runtime.config.StaticDir = dbConfig.LibpodRoot } if !runtime.configuredFrom.libpodTmpDirSet && dbConfig.LibpodTmp != "" { + if runtime.config.TmpDir != dbConfig.LibpodTmp && runtime.config.TmpDir != "" { + logrus.Debugf("Overriding tmp dir %q with %q from database", runtime.config.TmpDir, dbConfig.LibpodTmp) + } runtime.config.TmpDir = dbConfig.LibpodTmp } if !runtime.configuredFrom.volPathSet && dbConfig.VolumePath != "" { + if runtime.config.VolumePath != dbConfig.VolumePath && runtime.config.VolumePath != "" { + logrus.Debugf("Overriding volume path %q with %q from database", runtime.config.VolumePath, dbConfig.VolumePath) + } runtime.config.VolumePath = dbConfig.VolumePath } |