mirror of
https://github.com/containers/podman.git
synced 2025-10-15 02:06:42 +08:00
Add better descriptions for validation errors in DB
When validating fields against the DB, report more verbosely the name of the field being validated if it fails. Specifically, add the name used in config files, so people will actually know what to change it errors happen. Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
@ -79,23 +79,23 @@ func checkRuntimeConfig(db *bolt.DB, rt *Runtime) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := validateDBAgainstConfig(configBkt, "libpod root directory",
|
||||
if err := validateDBAgainstConfig(configBkt, "libpod root directory (staticdir)",
|
||||
rt.config.StaticDir, staticDirKey, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := validateDBAgainstConfig(configBkt, "libpod temporary files directory",
|
||||
if err := validateDBAgainstConfig(configBkt, "libpod temporary files directory (tmpdir)",
|
||||
rt.config.TmpDir, tmpDirKey, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := validateDBAgainstConfig(configBkt, "storage temporary directory",
|
||||
if err := validateDBAgainstConfig(configBkt, "storage temporary directory (runroot)",
|
||||
rt.config.StorageConfig.RunRoot, runRootKey,
|
||||
storage.DefaultStoreOptions.RunRoot); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := validateDBAgainstConfig(configBkt, "storage graph root directory",
|
||||
if err := validateDBAgainstConfig(configBkt, "storage graph root directory (graphroot)",
|
||||
rt.config.StorageConfig.GraphRoot, graphRootKey,
|
||||
storage.DefaultStoreOptions.GraphRoot); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user