Replies: 3 comments 3 replies
-
The pod unit must always be started as it runs the infra container when any container unit is started. And the pod by default will start all the containers in it but that can be turned off https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html#startwithpod |
Beta Was this translation helpful? Give feedback.
-
init containers might be helpful |
Beta Was this translation helpful? Give feedback.
-
So I scripted my way around it, automatically creating group systemd services that just start all other services. Good enough I guess. Thank you very much for your help and your work on this awesome project :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I tried googling this problem but either I am doing something wrong or nobody else has this problem:
I have a classic situation of a few different containers needing to communicate together, lets call them db and web.
As I also want to be able to start and stop both containers together, I created a pod, lets call it sum.
Now I want to be able to backup the database before any writing from web. I used to just start the db container, do the backup, then start the whole file (using docker-compose this was easy enough with a
docker-compose up db -d
).Using quadlets, if I do
systemctl --user start db
, I can see in the logs, that right after it automatically startssum-pod
, which then directly startsweb
, defeating the whole idea.Analyzing the created systemd service I can see the
--pod-id-file
argument for the container which seems to auto-start the pod.Is there a way to prevent this and only start
db
without also startingweb
, but still being able to start both together?As a sidenote,
requires
andafter
are not enough because the real thing has more containers and are not dependent on another. And it seems hacky to create an extra systemd file linking all of those together, and not quadlet-like.Beta Was this translation helpful? Give feedback.
All reactions