Commit Graph

7 Commits

Author SHA1 Message Date
Valentin Rothberg 0b53ff2902 fix lint - drop else block
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-08 15:44:21 +01:00
Valentin Rothberg aaec8b2408 fix lint: "guarantess" is a misspelling of "guarantees"
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-08 13:51:13 +01:00
Matthew Heon 87194a6f79 Fix F30-F31 migration for Podman 1.7.0
The earlier attempt to re-add config migration only worked with
user-specified configs (podman run --config). This version works
more in line with that we want - the first rootless config file
will be changed from runc to crun.

Verified on my system after an F31 migration - everything seems
to be working well.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-12-13 13:51:39 -05:00
Matthew Heon 0355c28edf Re-add Fedora 31 migration code.
In the process, make everything in the config omitempty in TOML.
We're seeing issues (notably [1]) where, after rewriting
libpod.conf, fields that were not previously populated are
written - and, because they were not previously written, they are
included as empty. This is unfortunately different from not
included at all - it means that we need to assume the user
explicitly unset the value, and we can't use defaults. Setting
omitempty prevents us from writing things that should not be
written as they were not set originally.

[1] https://github.com/containers/libpod/issues/4210

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-10 13:50:17 -05:00
Giuseppe Scrivano 0352bbc6e9
config: use EventsLogger=file without systemd
if systemd is not available, use the file events logger backend.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-21 12:02:04 +01:00
Valentin Rothberg 709ad91035 libpod/config: default: use `crun` on Cgroups v2
When running on a node with Cgroups v2, default to using `crun` instead
of `runc`.  Note that this only impacts the hard-coded default config.
No user config will be over-written.

Fixes: #4463
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-07 13:55:41 +00:00
Valentin Rothberg 11c282ab02 add libpod/config
Refactor the `RuntimeConfig` along with related code from libpod into
libpod/config.  Note that this is a first step of consolidating code
into more coherent packages to make the code more maintainable and less
prone to regressions on the long runs.

Some libpod definitions were moved to `libpod/define` to resolve
circular dependencies.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-31 17:42:37 +01:00