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

check access rights for systemd-related config options #580

Closed
vrothberg opened this issue May 26, 2021 · 3 comments · Fixed by #585
Closed

check access rights for systemd-related config options #580

vrothberg opened this issue May 26, 2021 · 3 comments · Fixed by #585

Comments

@vrothberg
Copy link
Member

Some config knobs require access to systemd/DBUS etc. (e.g., cgroups-manager, logger, eventer). In those cases, we should check early on if we have access rights to systemd/DBUS.

In the past week we hit two Podman issues (customer portal and upstream), where the rootless users did not have access rights. One could be solved with su --login but the other could not.

Checking early will protect users from facing all kinds of errors from all kinds of execution paths and allows us to give some meaningful error message and help them resolve the isssue (e.g., using --login with su, or pointing out that user is missing group access).

From the debugging session in containers/podman#10308

@rhatdan PTAL

@rhatdan
Copy link
Member

rhatdan commented May 26, 2021

@giuseppe @vrothberg is there an easy way for us to check so that containers-common/pkg/config can set the defaults. Perhaps check if /proc/1 == /proc/self? Then we know we are in a container without systemd, so set the defaults to non systemd defaults?

rhatdan added a commit to rhatdan/common that referenced this issue May 26, 2021
Currently we have users failing to run containers within containers
or on systems without systemd support.  This change will give us
better defaults on these systems.

Fixes: containers#580

Signed-off-by: Daniel J Walsh <[email protected]>
@vrothberg vrothberg reopened this May 27, 2021
@vrothberg
Copy link
Member Author

#585 did not fix that, see #585 (review).

@vrothberg
Copy link
Member Author

Fixed by @rhatdan in #621, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants