Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Return empty runtime directory if we're not rootless #4657
Currently, we return a runtime directory of the form
This patch fixes the problem by returning an empty runtime directory if the
Tested in Fedora 31 by running containers under both root and a regular
Note that this change will have some odd effects if podman containers are running when podman is updated with this fix. It may make sense for a %post script to move state information from
Currently, we return a runtime directory of the form `/run/user/<uid>`, even when running as root. Depending on configuration, that directory may be deleted when the user logs out, which is quite awkward when the container is started as a systemd service and then someone logs in and out as root. This patch fixes the problem by returning an empty runtime directory if the container is being started by root. The runtime should automatically use the default runtime directory (`/run/crun` when crun is used), which should be accessible to root. Tested in Fedora 31 by running containers under both root and a regular user. State for root containers is stored in `/run/crun`, while state for rootless containers is in `/run/user/<uid>/crun`. Signed-off-by: Jonathan Dieter <firstname.lastname@example.org>
Hi @jdieter. Thanks for your PR.
I'm waiting for a containers member to verify that this patch is reasonable to test. If it is, they should reply with
Once the patch is verified, the new status will be reflected by the
I understand the commands that are listed here.
[APPROVALNOTIFIER] This PR is APPROVED
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing
On Sat, Dec 7, 2019, 11:50 Giuseppe Scrivano ***@***.***> wrote: thanks a lot for looking into it and preparing a patch. LGTM — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#4657?email_source=notifications&email_token=AB3AOCD2SKXU2MKCUJKCICLQXPH4TA5CNFSM4JXNZ7SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGKZKA#issuecomment-562867368>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB3AOCGSWTZBOJNFOIF3BGTQXPH4TANCNFSM4JXNZ7SA> .
I also have this problem with systemd-managed containers on FC31. Until this patch is released, I believe that adding
Edit: You may also need to set this environment variable when running podman commands on these services from the console, i.e.
sudo env XDG_RUNTIME_DIR=/run podman ps