Bump github.com/containers/common from 0.31.0 to 0.31.1

Bumps [github.com/containers/common](https://github.com/containers/common) from 0.31.0 to 0.31.1.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.31.0...v0.31.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
dependabot-preview[bot]
2020-12-18 09:18:11 +00:00
committed by Valentin Rothberg
parent a17afa931d
commit 641046a79e
9 changed files with 50 additions and 26 deletions

View File

@ -586,6 +586,22 @@ func (c *Config) Validate() error {
return nil
}
func (c *EngineConfig) findRuntime() string {
// Search for crun first followed by runc and kata
for _, name := range []string{"crun", "runc", "kata"} {
for _, v := range c.OCIRuntimes[name] {
if _, err := os.Stat(v); err == nil {
return name
}
}
if path, err := exec.LookPath(name); err == nil {
logrus.Warningf("Found default OCIruntime %s path which is missing from [engine.runtimes] in containers.conf", path)
return name
}
}
return ""
}
// Validate is the main entry point for Engine configuration validation
// It returns an `error` on validation failure, otherwise
// `nil`.