-
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
podman generate systemd should only prepend separator when prefix is non-empty #13272
Comments
I think using |
The options all make sense as they stand. I just think the given separator should only be prepended if the relevant prefix is non-empty. Filenames starting with a hyphen is an annoying footgun 😁 An alternate wish would be to have |
Given the option is called separator and there is nothing to separate in this case it would make sense to this. |
Happily if I could, but I don't know Go 😁 |
…ate systemd When podman generate systemd is invoked, it previously did not check if container-prefix or pod-prefix are empty. When these are empty, the file name starts with the separator, which is hyphen by default. This results in files like '-containername.service'. The code now checks if these prefixes are empty. If they are, the filename no longer adds a separator. Instead, it uses name or ID of the container or pod. Closes containers#13272 Signed-off-by: Nirmal Patel <npate012@gmail.com>
…ate systemd When podman generate systemd is invoked, it previously did not check if container-prefix or pod-prefix are empty. When these are empty, the file name starts with the separator, which is hyphen by default. This results in files like '-containername.service'. The code now checks if these prefixes are empty. If they are, the filename no longer adds a separator. Instead, it uses name or ID of the container or pod. Closes containers#13272 Signed-off-by: Nirmal Patel <npate012@gmail.com>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When the
--container-prefix
and/or--pod-prefix
options topodman generate systemd
are set to empty string, the default--separator
should not be prepended. It creates filenames that begin with a hyphen, which are frustrating to deal with.Of course, you can workaround this by also setting the
--separator
to an empty string.Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Running on CentOS 9 Stream in a VMware Fusion VM.
The text was updated successfully, but these errors were encountered: