mirror of
https://github.com/containers/podman.git
synced 2026-10-08 19:22:37 -04:00
The Pod key of a .container unit accepts systemd specifiers, but handlePod looked the referenced pod up in the units map using the raw value, so "Pod=%N.pod" failed with "quadlet pod unit %N.pod does not exist" instead of resolving to the pod named after the container's service. Expand %N to the container's service name before the lookup, matching the existing handling in GetContainerResourceName. Since %N is the service name, setting ServiceName= lets the container and pod unit files use different names. Add e2e cases for both combinations: a pod named after the container file, and a pod named after a ServiceName that differs from the file name. Fixes: #29108 Signed-off-by: Salih Muhammed <root@lr0.org>