-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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] Escape @ in container names by default #18705
Comments
Interested in opening a PR to add this functionality? |
Currently, Quadlet does not support templating. There is an open discussion on this issue #17744. |
A friendly reminder that this issue had no activity for 30 days. |
Still waiting for @alexlarsson response. |
@ygalblum No response, but this is the upstream issue: I think changing the default to systemd-%p-%I if there is an Maybe we can decouple these for now by just saying we don't support the Install section on templates for now? That way we get part of this going, and can address easy auto-starting of templates later. |
A friendly reminder that this issue had no activity for 30 days. |
No update on this. |
I assume this can be closed after #21068 |
Feature request description
Context
I am using the Quadlet
.container
files to generate template units.The filename is
[email protected]
and the relevant part of the file looks like this:I start the units like this:
I'm using the template units because I need to run N services where the only difference is the
--consumer
option's value.The Problem
It took me a while to figure this out. If I don't specify
ContainerName
manually I get an error because the@
symbol is not allowed in aContainerName
, it is required to use a template unit, and the Quadlet generator does not escape or remove the@
when generating theContainerName
. Specifying theContainerName
manually to omit the@
and include the%I
placeholder instead avoids the issue and gives me the container namessystemd-memsol-index-1
,systemd-memsol-index-2
, etc.Suggest potential solution
Ideally Quadlet would generate a valid and unique name for instantiated template units.
If the unit file is a template unit, instead of using
systemd-%N
as the defaultContainerName
it would usesystemd-%p-%I
.For example, with the file
[email protected]
, runningsystemctl --user daemon-reload && systemctl --user start [email protected]
would start a container namedhttp-server-8080
.I don't believe this would count as a breaking change since the generated default
ContainerName
is not usable as-is?Have you considered any alternatives?
@
this wouldn't be an issue but that may have other ramifications@
could be replaced with a different symbol than a-
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: