-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Podman does not remove the overlay storage when the systemd service is restarted during reboot or shutdown #21093
Comments
I am not sure what is going on, but it looks like the containers are killed before they cleanup. Have you thought about using quadlets to define your containers? It has the latest podman commands for running containers under systemd, while |
Thank you for the tip, I'll have a look. Not too many containers need to be moved, I'll try with one container for now. p.s. it's quite a task rewriting the service to quadlets, but after reboot the only container up, is the one I rewrote:
Disadvantage it still does not run correctly, as it cannot access the OpenVino libs for the GPU I'll go back to the normal systemd service for now to get it up and running, except reboot. pps.
It may be better running these containers with not privileged. |
So, I have rewritten them all as quadlets and now I have the same issue:
The system is running only 8 containers as service. |
@vrothberg @giuseppe thoughts? |
Here is the container:
I only show the logs for that frigate container to keep it consistent, but the others have the same problem. |
I don't see the |
Issue Description
When the system is rebooted and systemd shuts down, it fails to remove the storage for every container on the system. Once the system comes back up and tries to start the service, it cannot create a new storage, because of the existing one.
Dec 27 11:08:07 dombox podman[1525]: time="2023-12-27T11:08:07Z" level=warning msg="Unmounting container \"frigate\" while attempting to delete storage: unmounting \"/var/lib/containers/storage/overlay/300f007294edabcaf4dff453cca24448d74d235076494e326f057262fed864f0/merged\": invalid argument"
And when the service tries to start after reboot:
dombox podman[1490890]: Error: reading CIDFile: open /run/container-frigate.service.ctr-id: no such file or directory
This worked before and stopped working about a week ago.
It happens to all containers with podman systemd services.
I can restart, stop, start containers via systemd once they are running, but not reboot or shutdown and start the operating system.
Steps to reproduce the issue
Steps to reproduce the issue
0. podman run -d -n frigate other options
Describe the results you received
Dec 27 11:08:07 dombox podman[1525]: time="2023-12-27T11:08:07Z" level=warning msg="Unmounting container \"frigate\" while attempting to delete storage: unmounting \"/var/lib/containers/storage/overlay/300f007294edabcaf4dff453cca24448d74d235076494e326f057262fed864f0/merged\": invalid argument"
And during boot
dombox podman[1490890]: Error: reading CIDFile: open /run/container-frigate.service.ctr-id: no such file or directory
Describe the results you expected
clean shutdown of the container during reboot or shutdown
podman info output
[root@dombox ~]# cat remove_podman_storage.sh
#!/bin/bash
yes | podman rm --storage homeassistant
yes | podman rm --storage mosquitto
yes | podman rm --storage zigbee2mqtt
yes | podman rm --storage wyoming-piper
yes | podman rm --storage wyoming-whisper
yes | podman rm --storage frigate
yes | podman rm --storage pihole
yes | podman rm --storage hass-configurator
The text was updated successfully, but these errors were encountered: