podman generate systemd --new doesn't support containers created with -h hostname
#15124
Labels
In Progress
This issue is actively being worked by the assignee, please do not work on this at this time.
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Using
podman generate systemd --new
fails ifcontainer has a dash in its namecontainer was created with-h hostname
optionEDIT: I was mistaken when trying to narrow down what the problem was originally; it's not the dash in the container name, it's just the presence of the
-h hostname
option that podman-generate-systemd doesn't likeSteps to reproduce the issue:
-h hostname
Describe the results you received:
Error: parsing remaining command-line arguments: pflag: help requested
Describe the results you expected:
It works fine if I use a different name for the container (i.e. victoriametrics with no dash / hyphen)It works if I don't specify the
-h hostname
while creating/running the containerAdditional information you deem important (e.g. issue happens only occasionally):
Another minimal reproducible test case:
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.):
Physical
The text was updated successfully, but these errors were encountered: