Issue Description
Previously, XDG_RUNTIME_DIR=/run/user-1000.
My system setup has changed, and after a reboot, XDG_RUNTIME_DIR points to a different location.
podman seems to have persisted the value of XDG_RUNTIME_DIR somewhere, and now fails, because it's trying to access a path which no longer exists:
> podman ps
WARN[0000] RunRoot is pointing to a path (/run/user-1000/containers) which is not writable. Most likely podman will fail.
Error: creating events dirs: mkdir /run/user-1000: permission denied
Note that the value of XDG_RUNTIME_DIR has been stable since the system rebooted: the value that podman is using was only ever exposed before the system went offline.
Steps to reproduce the issue
Steps to reproduce the issue
- Set
XDG_RUNTIME_DIR to some value.
podman run … (any container)
- Reconfigure the system so that the next boot uses a different
XDG_RUNTIME_DIR (e.g.: by changing the system component that initialises it).
- Reboot
podman ps
Describe the results you received
Podman tries to access a path based on an environment variable's value from a previous boot.
Describe the results you expected
Podman should not cache environment variables or values derived from them; it should read the current XDG_RUNTIME_DIR.
podman info output
Podman 5.8.1-r1, on Alpine Linux.
> podman info
WARN[0000] RunRoot is pointing to a path (/run/user-1000/containers) which is not writable. Most likely podman will fail.
Error: creating events dirs: mkdir /run/user-1000: permission denied
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Issue Description
Previously,
XDG_RUNTIME_DIR=/run/user-1000.My system setup has changed, and after a reboot,
XDG_RUNTIME_DIRpoints to a different location.podmanseems to have persisted the value ofXDG_RUNTIME_DIRsomewhere, and now fails, because it's trying to access a path which no longer exists:Note that the value of
XDG_RUNTIME_DIRhas been stable since the system rebooted: the value that podman is using was only ever exposed before the system went offline.Steps to reproduce the issue
Steps to reproduce the issue
XDG_RUNTIME_DIRto some value.podman run …(any container)XDG_RUNTIME_DIR(e.g.: by changing the system component that initialises it).podman psDescribe the results you received
Podman tries to access a path based on an environment variable's value from a previous boot.
Describe the results you expected
Podman should not cache environment variables or values derived from them; it should read the current XDG_RUNTIME_DIR.
podman info output
Podman 5.8.1-r1, on Alpine Linux.
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes