2017-12-11 14:50 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0013262CentOS-7systemdpublic2017-05-23 13:02
Product Version7.3.1611 
Target VersionFixed in Version 
Summary0013262: systemd-escape --template always invalid
DescriptionIn the past (a year~ish ago) we used a script using systemd-escape --template syntax. A year later we updated the machine, and re-ran the script.
It borked. The `man systemd-escape` page says:

       To generate instance names of three strings

           $ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III'
           systemd-nspawn@My\x20Container\x201.service systemd-nspawn@containerb.service systemd-nspawn@container-III.service

However, this produces:

[dexter@tinkerbell ~]$ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III'
Template name systemd-nspawn@.service is not valid.
TagsNo tags attached.
Attached Files
  • patch file icon patch-escape-template.patch (701 bytes) 2017-05-23 13:00 -
    From: T.Kabe <kabe@>
    Subject: [PATCH] systemd-escape --template=x@.service does not work
    diff -up ./src/escape/escape.c.dist ./src/escape/escape.c
    --- ./src/escape/escape.c.dist	2017-02-14 10:42:24.844112454 +0900
    +++ ./src/escape/escape.c	2017-02-14 11:35:25.237683707 +0900
    @@ -99,7 +99,7 @@ static int parse_argv(int argc, char *ar
                     case ARG_TEMPLATE:
    -                        if (!unit_name_is_valid(optarg, true) || !unit_name_is_template(optarg)) {
    +                        if (!unit_name_is_template(optarg)) {
                                     log_error("Template name %s is not valid.", optarg);
                                     return -EINVAL;
    patch file icon patch-escape-template.patch (701 bytes) 2017-05-23 13:00 +




kabe (reporter)

I'll share a patch I made locally.

I thought this was fixed in upstream systemd,
but still not in RHEL.
A good candidate for report to Red Hat Bugzilla.

-Issue History
Date Modified Username Field Change
2017-05-16 10:05 Heidistein New Issue
2017-05-23 13:00 kabe File Added: patch-escape-template.patch
2017-05-23 13:02 kabe Note Added: 0029316
+Issue History