I’ve run VyOS as my home router for over 2 years. Sometime within the last couple of months, overlay directories started showing up in my “/config” directory. These are in there right now:
drwx--S--- 2 root vyattacfg 4.0K Dec 28 2023 overlay
drwx--S--- 2 root vyattacfg 4.0K Dec 28 2023 overlay-containers
drwx--S--- 2 root vyattacfg 4.0K Dec 28 2023 overlay-layers
drwx--S--- 2 root vyattacfg 4.0K Dec 28 2023 overlay-locks
I often get them in my vyos user home directory. Or in seemingly other random directories. I posted on this old topic, but there’s never been any discussion as to why exactly.
Any ideas? I also have other problems with running containers, so I’m wondering if they’re related…
Question is what you did on 28th Dec 2023 to create these?
Files needed should be recreated upon boot like the pre/postboot script (it will obviously be empty after recreation).
Everything in /config will be copied to the new “/config” when you perform a system upgrade (persistent directory overlayed upon the content from the squashfs file) - this way the old version will have its config dir as it were upon the time of upgrade.
That is if you upgrade and then some days later find some anomaly so you want to revert you can just reboot back to old version and have the old config back (handy to not end up in a bricked device as you would with lets say a cisco switch/router if you want to go back to older version where the newer version have rearranged some config settings).
There have been multiple bugs with older versions of podman where it will pick up a CWD inappropriately, or in some cases, even cache it in per-user or system-wide state to continue to be used inappropriately (in one case mentioned in the bug report, an old and very wrong path continued to be used even after fixes were applied as it was in the libpod cache).
That you’re seeing a lot of overlays appear in the homedirs sounds somewhat similar to me - that’s the place you’d most likely be running podman from. It’s possible that you’ve either manually run it from /config as well, or internal VyOS machinery using /config as a CWD has executed podman commands.
That it’s appeared and become a lot more frequent all of a sudden would also lend itself towards bad state being cached somewhere.
I don’t have a direct suggestion on how to solve it though, beyond updating to the latest VyOS (which includes a very recent podman) and resetting as much of the podman state as possible.
Ok, I just updated my OS today from a build this week. From current. I deleted all overlay folders that were not where I thought they should have been. In “/config” and “/home/vyos”.
Let’s see if they come back. I’ll try and watch if I can tell if they come after I do certain commands with the container.
I just ran show container from /home/vyos (because I’m dealing with an issue with a crashing container… but, I immediately got the overlay directories created.
I also tested running sudo podman ps, and yes, even then, directories created.
drwx------ 2 root root 4.0K Nov 7 13:22 overlay
drwx------ 2 root root 4.0K Nov 7 13:22 overlay-containers
drwx------ 2 root root 4.0K Nov 7 13:22 overlay-layers
drwx------ 2 root root 4.0K Nov 7 13:22 overlay-locks
$ sudo podman --version
podman version 4.9.5
$ show version
Version: VyOS 1.5-rolling-202411041834
Release train: current
Release flavor: generic
Built by: myemail
Built on: Mon 04 Nov 2024 18:34 UTC
Build UUID: d4c4c2a6-d385-4391-93de-a3dba23168c3
Build commit ID: a900353a5b2b85
Architecture: x86_64
Boot via: installed image
System type: bare metal
Secure Boot: n/a (BIOS)
Hardware vendor: Protectli
Hardware model: FW4B
Hardware S/N: 123456789
Hardware UUID: Unknown
Copyright: VyOS maintainers and contributors