-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Feature request description
The interaction of a systemd unit with podman wait is particularly unsatisfactory when using podman-compose if you want to start, control and monitor more than one container per service.
following option in the systemd unit:
[Service]
Type=simple
ExecStart=podman wait --condition=unhealthy container1 container2
This function causes the systemd unit to fail only when both containers are unhealthy. This means that they are logically linked with "and" instead of "or" as expected.
$podman wait --help
Description: Block until one or more containers stop and then print their exit codes.
It is therefore currently not possible to check the status of several containers per service unit without a workaround:
while true; do podman ps -a --format {{.Status}} --filter label=io.podman.compose.project= | grep unhealthy && exit 1; done && exit 1
I think this could be a great feature to improve the communication between service and container and to implement some kind of check/watchdog.
Regards,
Lars