Closed acrispino closed 5 months ago
Thanks for reaching out, @acrispino!
@ygalblum do you have time to look into this?
I think that is intentional: https://github.com/containers/podman/pull/17930
@ygalblum reping
I wonder if we have to keep a list of systemd specifiers that expand to and absolute path and the one that are just a name in which case we need to keep the relative path?
Or maybe rethinking the whole thing, would it be smarter to let qualdet not expend the relative path and set WorkingDirectory=
instead, then podman would resolve the path at runtime which may be better?
Sorry for the delay in my response.
@Luap99 I think you have a point there. In the current main
branch, Quadlet supports setting WorkingDirectory=
only for .kube
files in order to allow the resolving of relative paths set inside the .yaml
file. However, since the feature is focuses on these relative paths, it does not prevent the resolution for the command line parameters. This feature can be enhanced to support .container
files and to not resolve the command line parameters. But, as always, we will need to keep backward compatibility in our mind.
@acrispino for you specific case, since whatever is decided will still take time to implement and publish, you can force relative path resolution by changing:
EnvironmentFile=%n/env
to
EnvironmentFile=./%n/env
A friendly reminder that this issue had no activity for 30 days.
@ygalblum @acrispino Still worth pursuing?
@acrispino is my suggestion of forcing the relative path by prefixing it with ./
enough for this issue?
Yes, that's how I've worked around it and my services are running fine.
So @ygalblum is this something you like to address or should we just close wontfix given it is like this now for almost a year.
@Luap99 I think documenting it is enough.
Issue Description
After upgrading to 4.5.1-4 on Centos Stream 9, a .container file that was working with 4.4.1-9 no longer starts. It seems to have to do with how
EnvironmentFile
is parsed to create the serviceExecStart
I've worked around it but is the change in behavior a bug? Is this related to #17906?
Steps to reproduce the issue
Describe the results you received
Here's the output of
/usr/libexec/podman/quadlet -dryrun -user
. I've left out the lines that are unchanged between the two versions(podman-2:4.4.1-9.el9.aarch64):
(podman-2:4.5.1-4.el9.aarch64):
The
ExecStart
line no longer has the .container file's directory prepended for--env-file
. If I change the container's configuration toEnvironmentFile=./%n/env
then the generated--env-file
is the same as in 4.4.1 and the service can start again.Describe the results you expected
For the container
EnvironmentFile=%n/env
to be parsed as a relative pathpodman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
AWS AMI
ami-02ddfebde24219626
Additional information
No response