-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quadlet: EnvironmentFile
paths starting with systemd specifiers are not recognized as absolute
#17906
Comments
@ygalblum PTAL |
@vrothberg WDYT? |
I don't think systemd-specifiers can easily be supported. The Quadlet-related fields are interpreted by Quadlet and not by systemd, as such I don't see it as a bug. |
Well quadlet thinks that this is a relative path and thus adds the systemd unit dir path in front which is a incorrect assumption. As reported it should be possible to check for the systemd specifier. If quadlet doesn't properly support systemd specifiers it will be much more difficult to create generic units that can be run everywhere. |
Apologies, I skimmed the issue in a hurry and skipped the important part. I totally agree that Quadlet should properly process the identifiers, pass them on and let systemd interpret it. |
Thanks for implementing this so fast! @ygalblum |
Issue Description
When a systemd specifier like
%h
is used in the path forEnvironmentFile
, it is not recognized as an absolute path and the.container
file location (e.g./var/home/podman/.config/containers/systemd
) is prepended. For theVolume
key, it works fine, at least in 4.4.1, but maybe it is also broken now because of commit 5382997.Steps to reproduce the issue
Steps to reproduce the issue
.container
file with contentsystemctl --user daemon-reload
$XDG_RUNTIME_DIR/systemd/generator/
Describe the results you received
The
EnvironmentFile
line is translated into thepodman container run
argument--env-file /var/home/podman/.config/containers/systemd/%h/env
.Describe the results you expected
The
EnvironmentFile
path should be adopted unmodified. The correct commandline argument is:--env-file %h/env
.There are several systemd specifiers for different paths. Either all paths starting with
%[a-zA-Z]
should be assumed to be absolute or it can be specifically checked for the path specifiers:%C
%d
%E
%h
%L
%S
%t
%T
%V
%Y
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: