mgoltzsche / podman-static

static podman binaries and container image
Apache License 2.0
253 stars 60 forks source link

podman-restart fails to restart containers #105

Open tibkiss opened 1 month ago

tibkiss commented 1 month ago

Given a set of services defined in docker-compose and executed via podman-compose using podman-static 5.2.3. After enabling the podman-restart service the containers fails to on reboot:

root@mesosim-portal:/home/tiborkiss# systemctl status podman-restart
× podman-restart.service - Podman Start All Containers With Restart Policy Set To Always
     Loaded: loaded (/lib/systemd/system/podman-restart.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-10-02 09:45:58 UTC; 45s ago
       Docs: man:podman-start(1)
    Process: 799 ExecStart=podman $LOGGING start --all --filter restart-policy=always (code=exited, status=125)
   Main PID: 799 (code=exited, status=125)
        CPU: 2.150s

Oct 02 09:45:56 mesosim-portal [1912]: conmon 8cbd3f2235d7fa01a53a <error>: Failed to create container: exit status 1
Oct 02 09:45:56 mesosim-portal [2076]: conmon 1ce66fc1eb95d4a58830 <nwarn>: runtime stderr: executable file `/app/mesosim.portal` not found in $PATH: No such file or directory
Oct 02 09:45:56 mesosim-portal [2076]: conmon 1ce66fc1eb95d4a58830 <error>: Failed to create container: exit status 1
Oct 02 09:45:56 mesosim-portal [2128]: conmon 7da22903ab7332772646 <nwarn>: runtime stderr: executable file `docker-entrypoint.sh` not found in $PATH: No such file or directory
Oct 02 09:45:56 mesosim-portal [2128]: conmon 7da22903ab7332772646 <error>: Failed to create container: exit status 1
Oct 02 09:45:58 mesosim-portal systemd[1]: podman-restart.service: Failed with result 'exit-code'.
Oct 02 09:45:58 mesosim-portal systemd[1]: Failed to start Podman Start All Containers With Restart Policy Set To Always.
Oct 02 09:45:58 mesosim-portal systemd[1]: podman-restart.service: Consumed 2.150s CPU time.

Executing manually the restart command from shell (podman --log-level=info start --all --filter restart-policy=always) seems to correctly start the containers.

Sidenote: During the manual restart process one of my containers fail to start due to a missing volume (/tmp/foo is not created after restart), but that's likely to be related to podman's volume creating behavior and unrelated to podman-restart service.