podman: Error: database libpod root directory (staticdir) does not match our libpod root directory (staticdir)
Issue Description
Starting with version 4.8.0, I get the error below.
Error: database libpod root directory (staticdir) "/home/<user>/.local/share/containers/storage/libpod" does not match our libpod root directory (staticdir) "/var/home/<user>/.local/share/containers/storage/libpod": database configuration mismatch
I’m on Fedora Kinoite 39. No problems with version 4.7.2.
Steps to reproduce the issue
Steps to reproduce the issue
- Upgraded to 4.8.0 from 4.7.2.
- Try to start a container
podman --log-level debug start postgres
Describe the results you received
INFO[0000] podman filtering at log level debug
DEBU[0000] Called start.PersistentPreRunE(podman --log-level debug start postgres)
DEBU[0000] Using conmon: "/usr/bin/conmon"
INFO[0000] Using boltdb as database backend
DEBU[0000] Initializing boltdb state at /var/home/<user>/.local/share/containers/storage/libpod/bolt_state.db
DEBU[0000] Overriding graph root "/var/home/<user>/.local/share/containers/storage" with "/home/<user>/.local/share/containers/storage" from database
DEBU[0000] Using graph driver overlay
DEBU[0000] Using graph root /home/<user>/.local/share/containers/storage
DEBU[0000] Using run root /run/user/1000/containers
DEBU[0000] Using static dir /var/home/<user>/.local/share/containers/storage/libpod
DEBU[0000] Using tmp dir /run/user/1000/libpod/tmp
DEBU[0000] Using volume path /var/home/<user>/.local/share/containers/storage/volumes
DEBU[0000] Using transient store: false
Error: database libpod root directory (staticdir) "/home/<user>/.local/share/containers/storage/libpod" does not match our libpod root directory (staticdir) "/var/home/<user>/.local/share/containers/storage/libpod": database configuration mismatch
DEBU[0000] Shutting down engines
Describe the results you expected
Container should start normally.
podman info output
Error: database libpod root directory (staticdir) "/home/<user>/.local/share/containers/storage/libpod" does not match our libpod root directory (staticdir) "/var/home/<user>/.local/share/containers/storage/libpod": database configuration mismatch
OS: Fedora Kinoite 39
Arch: x86_64
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Running of bare metal.
Additional information
None.
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 8
- Comments: 24 (11 by maintainers)
Commits related to this issue
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to mheon/libpod by mheon 7 months ago
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to mheon/libpod by mheon 7 months ago
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to mheon/libpod by mheon 7 months ago
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to mheon/libpod by mheon 7 months ago
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to mheon/libpod by mheon 7 months ago
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to mheon/libpod by mheon 7 months ago
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to mheon/libpod by mheon 7 months ago
- fest: add target for podman-setup includes workaround for https://github.com/containers/podman/issues/20872 — committed to clemak27/linux_setup by clemak27 7 months ago
- fest: add target for podman-setup includes workaround for https://github.com/containers/podman/issues/20872 — committed to clemak27/linux_setup by clemak27 7 months ago
- Handle symlinks when checking DB vs runtime configs When Podman starts, it checks a number of critical runtime paths against stored values in the database to make sure that existing containers are no... — committed to openshift-cherrypick-robot/podman by mheon 7 months ago
Perfect! That works for podman at least
For future finders my file looks like
Now trying to access existing containers with distrobox I get an error like
But I’m happy to take this elsewhere if it’s not directly related to podman 😄
EDIT: Managed to rescue, turns out it was SELinux. Turning it off but not fully disabled allowed me to carry on using my old containers; thanks @mheon you’re a life-saver 😄
There are no consequences even after the fix lands. The two paths are symlinked together, we’re just forcing another version be used when doing database checks.
Thank you very much! I was having the same problem and this issue helped me solve it.
In my environment, there was no directory, not even containers.conf, but if I create the directory and file, it should be OK. The containers.conf mentioned in this comment is in the following path,
/home/lkn/.config/containers/containers.confI rebased from Fedora 39 Kinoite to Rawhide Kinoite to do some testing and this affects my ability to run a toolbox:
I couldn’t reproduce this on my Fedora 39 Silverblue:
… but clearly a lot of people can. Based on these two comments, I think this affects those who have been upgrading their installations in-place for a while.
I usually reinstall once every year, and I remember that we changed the default value of
HOMEfrom/home/footo/var/home/fooat some point to avoid relying on the symbolic link.Setting
static_dirin containers.conf is more likely to work. If your error message is:Then set
static_dirto the “database libpod root directory” (in this case/home/<user>/.local/share/containers/storage/libpod)