-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
database libpod temporary files directory (tmpdir) "/tmp/run-1000/libpod/tmp" does not match our libpod temporary files directory (tmpdir) "/run/user/1000/libpod/tmp": database configuration mismatch #5950
Comments
@mheon was just talking about this exact situation inside of a bugzilla. Where the location of the temporary files is being stored in the database. And we don't have a good way of solving this situation. |
@rhatdan Do you have the bugzilla link? |
Not right now, but when @mheon joins, he will point to it. |
I actually don't think this is that BZ. As I look at this more, I start to think that this is a containers.conf breakage. @adelton Do you have a ~/.config/containers/libpod.conf and can you provide the contents if you do? |
Thought process here: this looks like a Podman config originally created with a really old version, using a non-standard tmpdir path. I think that path is somehow being overwritten now. |
I don't have any The podman / libpod was freshly installed on this Fedora. |
Hm. Is this the first time you've run Podman as this user? It could actually be the BZ after all. |
@mheon he is saying he logged in first from root and did a |
Yeah, this is definitely the same case as the BZ, then - BZ number looks to be 1824063 |
We hit this also in cockpit tests:
then we shut the VM down, boot it back up, login as
It does not need to be even |
Without this, `$XDG_RUNTIME_DIR` defaults to /tmp/run-1000/libpod/tmp, which creates a mismatch in the created configuration. See containers/podman#5950
IMHO the cleanest solution is to actually do what the warning says, and run
or
In our previous version of the test I just tried to set |
Two possible workarounds:
|
Without this, `$XDG_RUNTIME_DIR` defaults to /tmp/run-1000/libpod/tmp, which creates a mismatch in the created configuration. See containers/podman#5950 Closes cockpit-project#370
Without this, `$XDG_RUNTIME_DIR` defaults to /tmp/run-1000/libpod/tmp, which creates a mismatch in the created configuration. See containers/podman#5950 Closes #370
Just to make sure we understand the impact, this only affects rootless containers, right? |
This can affect root containers as well, but we're using tmpfs directories not managed by systemd there, so it's a lot harder to hit - you could deliberately produce a configuration that would hit it, but the default config never should. |
I've been running into the same error (tho possibly via a different cause - starting rootless containers from the "system" systemd with It feels it could be some kind of race between a rootless podman initialising before systemd-logind has the opportunity to create/mount |
I think that's probably accurate. I know that we've definitely had issues with running with the User directive without having lingering enabled for the user in question. It's unclear to me whether it's actually a race, or systemd is simply not creating the directories at all (not interpreting this as a "real" login); regardless, the end result is the same (we don't have |
I am reproducing this on the Fedora CoreOS
Version info:
|
Yep, that's pretty much what i'm doing (with linger enabled on the I see |
To update with status from a discussion in IRC, we think we've identified the cause of the race, and @rhatdan is looking into a fix |
The proposed change in #6125 seems to fix the issue for me. |
Neat. I can see how it fixes the issue, just wondering if having podman's tmpdir set differently depending on the state of the filesystem the first time it was invoked could be a bit nondeterministic/confusing? (or should the tmpdir not be something we have to care much about?) |
The DB should actually override in that case - we'll be forced to use the original temporary directory. If it actually doesn't exist, we'll still blow up, but since this seems to be a race, we should be fine. |
Since #6125 is merged we can close this. This will be in podman-1.9.2 which should be done early next week. |
should we close this (fixed by #6125) and maybe link to the conmon PR that fixed it originally? |
darn.. commented on a stale page. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I've first run rootless podman via
su - user
session from root. It was giving me warning messagesbut it worked.
I then thought, OK, I will log in to the machine properly. I've logged in via ssh. But then podman fails with
Steps to reproduce the issue:
useradd user
su - user
to the user and runpodman images
ssh user@machine
and runpodman images
Describe the results you received:
Describe the results you expected:
No error, I shouldn't be bothered by podman/libpod picking different location in each case. Also, similar to #5932, the error message gives no indication about how to fix this, where that
database libpod temporary files directory
is configured.Additional information you deem important (e.g. issue happens only occasionally):
Deterministic. Can be re-reproduced by removing
~/.local
and repeating steps 2 and 3.Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Physical.
The text was updated successfully, but these errors were encountered: