Closed podhorsky-ksj closed 1 week ago
This is not a quadlet issue, it creates the unit file with the dependencies. Systemd however cannot handle dependencies on system units from the user session, see https://github.com/systemd/systemd/issues/3312 and https://github.com/containers/podman/issues/22197
I tried different approach, but I have still issue with quadlet file. It starts on boot. I used the network-online example from https://github.com/systemd/systemd/issues/3312, used wants, required i BindsTo between services, but still there is at least one failed service after boot. It will try it again, when there is restart, but this is wrong approach. I think it is because first time it starts after default.target is up regardless of dependencies - caused by enabled directive, which I don't know how to remove. If I remove [install] part, it doesn't start at all.
When I tried BindsTo with after like it is here: https://www.reddit.com/r/podman/comments/13sdjtm/quadlet_not_obeying_requires_unit_entry_and/ service will fail on dependency and don't even try to restart itself, even network_online is up.
I would like my containers start once the previous is started. E.g. first network-online, then postgres, then forgejo or else. But always some of them fail after boot.
Issue Description
It seems quadlet don't care about dependencies during boot. Here is the quadlet file:
And there are logs:
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
Service from quadlet starts before network is established and it failed on execstartpre step - this needs network
Describe the results you expected
service run after the network is established. I have the same issue with timer. I would like the quadlet service to run after this.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
archlinux latest bare methal
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting