diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go index 936ccbf4cb2..887654f0f22 100644 --- a/libpod/boltdb_state_internal.go +++ b/libpod/boltdb_state_internal.go @@ -146,10 +146,11 @@ func validateDBAgainstConfig(bucket *bolt.Bucket, fieldName, runtimeValue string return nil } - // If DB value is the empty string, check that the - // runtime value is the default - if string(keyBytes) == "" && defaultValue != "" && - runtimeValue == defaultValue { + // If DB value is the empty string, we ought to be fine. + // (Though I'm honestly not sure how we got this far + // with an empty-string DB config) + if string(keyBytes) == "" { + logrus.Warnf("Database stored empty configuration for %s - unable to validate", fieldName) return nil } diff --git a/pkg/util/utils.go b/pkg/util/utils.go index d7e1ddd38ee..3b14b9c3291 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -297,6 +297,9 @@ func GetDefaultStoreOptions() (storage.StoreOptions, error) { err error ) storageOpts := storage.DefaultStoreOptions + if !rootless.IsRootless() { + storageOpts = storage.StoreOptions{} + } if rootless.IsRootless() { storageOpts, err = GetRootlessStorageOpts() if err != nil {