quadlet: expand %N specifier in the Pod key#29113
Conversation
|
This fix works only if the So while it does give some benefit, I'm not sure how much. |
|
My aim was narrower than that case, |
|
Sorry, not sure I understand your comment. First, Quadlet fails processing the |
54fc79c to
8c05e29
Compare
|
the problem is that it reports |
ygalblum
left a comment
There was a problem hiding this comment.
Please explain the usage of this specifier in the Quadlet documentation:
There was a problem hiding this comment.
Quadlet tests are implemented in /test/e2e. Please remove this file
8c05e29 to
ce3ad95
Compare
|
@larrasket you have an error in the man page. Not sure what it is |
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: podman-container-tools#29108 Signed-off-by: Salih Muhammed <root@lr0.org>
ce3ad95 to
1fa03a1
Compare
|
the Pod= note contradicted the RESOURCE NAMING. I reworded it. |
|
@larrasket the doc build is still failing |
The Pod key of a .container unit accepts systemd specifiers,
handlePodlooked the referenced pod up in the units map using the raw value, a"Pod=%N.pod"failed with"quadlet pod unit %N.pod does not exist"instead of resolving to the pod named after the container.this expand %N to the container's service name before the lookup, matching the existing handling in
GetContainerResourceName.Fixes: #29108
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?