[systemd-devel] non-existent unit instances
Daniele Nicolodi
daniele at grinta.net
Sat Sep 5 11:22:54 UTC 2020
On 05/09/2020 13:18, Kevin P. Fleming wrote:
> It's a general issue with templated unit files; I've had this happen
> as well, and could not figure out why the service had failed to start.
> It was because I had mistyped the instance name. As best I can tell
> systemd doesn't have any mechanism to restrict the instance names
> which can be used for a specific unit file, so it can't know that the
> requested instance cannot be started.
The point of templated units is to allow arbitrary string as template
replacement. If you need to restrict the template expansion, by
definition you can enumerate the possible template expansion, and thus
you can generate the unit files with a script or with a generator.
Cheers,
Dan
More information about the systemd-devel
mailing list