Hi Muayyad,

Thanks for reaching out.

On Wed, Feb 23, 2022 at 8:26 PM Muayyad AlSadi <alsadi@gmail.com> wrote:
Hi,

when creating a pod with nothing shared and without infra

podman generate systemd -n pod_test
Error: error generating systemd unit files: Pod "pod_test" has no infra container


here is the full commands

podman pod create --name=pod_test --infra=false --share=
podman network create pod_net
podman run --name=test_web80 -d --net pod_net --hostname web80 --pod=pod_test busybox httpd -f -p 8080 -h /etc
podman run --name=test_web90 --requires=test_web80 -d --net pod_net --hostname web90 --pod=pod_test busybox httpd -f -p 9090 -h /etc
podman pod ps


9a894043a1e1  pod_test        Running     18 seconds ago              2

if we replace 

podman pod create --name=pod_test --infra=false --share=

with

podman pod create --name=pod_test  --share=

podman pod ps

would display Degraded

5f2458ba5eac  pod_test        Degraded    18 seconds ago  a3a4ca1b8e4d  3

if we remove --share=
it would complain about multiple hostnames

what do you suggest?

Using a pod with an infra container will resolve the issue.
 
and why systemd care about infra?

We need one top-level service to manage the pod. The infra container is the main PID of the `pod.service`. As long as the pod is running, the infra is running. Without that, there is no generic way of tracking and managing the life cycle of the pod.

We could tie it to the first container in the pod but that may not be a generic solution: if this container exists, the entire pod would falsely be marked as exited regardless of other containers in the pod which might still be running.

Kind regards,
 Valentin
 
_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io