Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reminder: rootless, rawhide: spurious warnings #4456

Closed
edsantiago opened this issue Nov 5, 2019 · 8 comments · Fixed by #4457
Closed

reminder: rootless, rawhide: spurious warnings #4456

edsantiago opened this issue Nov 5, 2019 · 8 comments · Fixed by #4457
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@edsantiago
Copy link
Collaborator

Just a reminder that gating tests are broken for rootless on rawhide due to spurious warning messages:

$ podman images
WARN[0000] The cgroups manager is set to systemd but there is no systemd user session available
WARN[0000] For using systemd, you may need to login using an user session
WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1000` (possibly as root)
WARN[0000] Falling back to --cgroup-manager=cgroupfs
REPOSITORY   TAG   IMAGE ID   CREATED   SIZE

It seems possible that this is an unintended side effect of #4352. This is something for @vrothberg to look at once he's back. I'm filing issue so it doesn't get forgotten.

First build showing this problem: ca4c24c

@mheon
Copy link
Member

mheon commented Nov 5, 2019

Why are we printing warning messages again? I remember fixing that.

@edsantiago
Copy link
Collaborator Author

@mheon I believe it is a side effect of the config-parsing changes in #4352

@mheon
Copy link
Member

mheon commented Nov 5, 2019

I think it's the code in the init() block in main_local.go. It's running before we properly set log level.

We should investigate moving it into Before() which contains most of our init logic.

vrothberg added a commit to vrothberg/libpod that referenced this issue Nov 6, 2019
Do not generate an entire `config.Config` for displaying the default
value for the --cgrou-manager flag and just default to systemd. Not
using the `config.Config` is okay as 1) the value may change at runtime
in any case (rootless, DBUS access, etc.), 2) it avoids to redundantly
parse the system config files and to generate the hard-coded default
config, and 3) the log-level and other attributes are not yet set during
init() causing undesirable side effects.

Fixes: containers#4456
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@vrothberg
Copy link
Member

I suggest removing the config generation entirely, see #4457.

vrothberg added a commit to vrothberg/libpod that referenced this issue Nov 6, 2019
Do not generate an entire `config.Config` for displaying the default
value for the --cgroup-manager flag and just default to systemd. Not
using the `config.Config` is okay as 1) the value may change at runtime
in any case (rootless, DBUS access, etc.), 2) it avoids to redundantly
parse the system config files and to generate the hard-coded default
config, and 3) the log-level and other attributes are not yet set during
init() causing undesirable side effects.

Fixes: containers#4456
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@edsantiago
Copy link
Collaborator Author

Followup: #4457 seems to have fixed the spurious warning messages, thank you. But gating tests are now failing rootless with:

$ podman run --rm quay.io/libpod/alpine_labels:latest /bin/true
time="2019-11-06T12:51:29Z" level=error msg="oci runtime \"runc\" does not support CGroups V2: use system migrate to mitigate"
Error: this version of runc doesn't work on cgroups v2: OCI runtime error

It'll take me a little while to look into it; am commenting simply in case it elicits an "aha" in anyone.

@vrothberg
Copy link
Member

Great, happy we could tackle it so quickly!

It'll take me a little while to look into it; am commenting simply in case it elicits an "aha" in anyone.

@edsantiago did this work before? I think we have two options: 1) force the gating tests to use crun or 2) force crun in the config.Config logic. Cc @mheon

@edsantiago
Copy link
Collaborator Author

Before what? :-/ Gating tests were passing in 1e750f7, October 31, and I'm pretty sure that was with crun.

@vrothberg
Copy link
Member

@edsantiago, the error message indicates that we're running runc. I don't know how these tests are run, so I wonder what has changed. Let's make it a PS?

mheon pushed a commit to mheon/libpod that referenced this issue Dec 10, 2019
Do not generate an entire `config.Config` for displaying the default
value for the --cgroup-manager flag and just default to systemd. Not
using the `config.Config` is okay as 1) the value may change at runtime
in any case (rootless, DBUS access, etc.), 2) it avoids to redundantly
parse the system config files and to generate the hard-coded default
config, and 3) the log-level and other attributes are not yet set during
init() causing undesirable side effects.

Fixes: containers#4456
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants