[Bug 758427] New: systemd unit templates don't resolve %-specifiers properly
https://bugzilla.novell.com/show_bug.cgi?id=758427 https://bugzilla.novell.com/show_bug.cgi?id=758427#c0 Summary: systemd unit templates don't resolve %-specifiers properly Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: All OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Yarny@public-files.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 In a systemd unit template file (a file like /etc/systemd/system/blah@.service) at least the fields "ConditionPathExists" and "Requires" have trouble handling %I. Reproducible: Always Steps to Reproduce: Here are two service files which I created in order to autostart an iaxmodem whenever a corresponding faxgetty gets started: ================= iaxmodem@.service ================ [Unit] Description = IAXmodem for /dev/%I ConditionPathExists = /etc/iaxmodem/%I Requires = asterisk.service After = asterisk.service [Service] Type = simple ExecStart = /usr/sbin/iaxmodem %I ==================================================== ============= faxgetty4ttyiax@.service ============= [Unit] Description = HylaFAX faxgetty at /dev/%I ConditionPathExists = /var/spool/fax/etc/config.%I ConditionPathExists = /etc/iaxmodem/%I Requires = iaxmodem@%I.service [Service] Type = simple Restart = on-success ExecStart = /usr/lib/fax/faxgetty /dev/%I ==================================================== The files /etc/iaxmodem/ttyiax1 and /var/spool/fax/etc/config.ttyiax1 exist. Actual Results: $ systemctl start faxgetty4ttyiax@ttyiax1.service produces
systemd[1]: Failed to add dependency on iaxmodem@%I.service, ignoring: Invalid argument in /var/log/messages and start condition failed at ... in the status output of $ systemctl status faxgetty4ttyiax@ttyiax1.service
Expected Results: $ systemctl start faxgetty4ttyiax@ttyiax1.service should start a faxgetty instance and pull in the corresponding iaxmodem service. If my understanding of the templating mechanism (on the man page of systemd.unit) is correct, such a construction is supposed to work. If it is intentional that the %-specifiers don't get resolved, please consider this bug report a feature request. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=758427 https://bugzilla.novell.com/show_bug.cgi?id=758427#c kk zhang <kkzhang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkzhang@suse.com AssignedTo|bnc-team-screening@forge.pr |fcrozat@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=758427 https://bugzilla.novell.com/show_bug.cgi?id=758427#c1 --- Comment #1 from Frederic Crozat <fcrozat@suse.com> 2012-04-23 13:45:48 UTC --- for Requires (and other dependencies ), the only accepted format strings are: %n %N %p %i for ConditionPathExists, it doesn't look supported, from a quick look at the code but I don't know if it is wanted or a bug. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=758427 https://bugzilla.novell.com/show_bug.cgi?id=758427#c2 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #2 from Frederic Crozat <fcrozat@suse.com> 2013-03-11 17:30:04 UTC --- closing as invalid. Please open a bug upstream on https://bugs.freedesktop.org/ if you want more % specifier to be supported -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com