FS#37755 - [systemd] does not start service for USER with dash in name

Attached to Project: Arch Linux
Opened by Sergey Zolotorev (serzh-z) - Wednesday, 13 November 2013, 09:41 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 13 November 2013, 22:38 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

systemd will not start any service for user which name contains dash ("-"). systemd will exit with status 217

Additional info:
* systemd version is 208-2

Steps to reproduce:

1. Enable service for user (for example btsync-autoconfig or dropbox) for user with dashes in name: systemctl enable dropbox@test-user.service
2. Try to start: systemctl start dropbox@test-user.service
3. See status: systemctl status dropbox@test-user.service

Status contains something like this:

dropbox@test-user.service - Dropbox
Loaded: loaded (/usr/lib/systemd/system/dropbox@.service; enabled)
Active: failed (Result: start-limit) since Ср 2013-11-13 13:38:26 MSK; 3s ago
Process: 16923 ExecStart=/usr/bin/dropboxd (code=exited, status=217/USER)
Main PID: 16923 (code=exited, status=217/USER)

For user "test" all works.
This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 13 November 2013, 22:38 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Working as intended. Use the correct formatter for the use case in the unit file.
Comment by Dave Reisner (falconindy) - Wednesday, 13 November 2013, 14:22 GMT
Please report this upstream.
Comment by Sergey Zolotorev (serzh-z) - Wednesday, 13 November 2013, 15:19 GMT Comment by Dave Reisner (falconindy) - Wednesday, 13 November 2013, 18:25 GMT
Uggh, I misread this. Your unit file is probably wrong and uses %I instead of %i for the User. Dashes are treated as escaped slashes, so using %I means it'll be unescaped to test/user, which doesn't exist (and yields the failure).
Comment by Sergey Zolotorev (serzh-z) - Wednesday, 13 November 2013, 18:46 GMT
Well... So whose is this bug? =) Upstream systemd or Arch Linux's version of systemd (and dropbox's maintainer for AUR's dropbox service file)?

Look into the any systemd file:

pacman -Ql systemd | grep /usr/lib | grep @

Most of them contain "%I" (like AUR's dropbox service file).
Comment by Dave Reisner (falconindy) - Wednesday, 13 November 2013, 18:55 GMT
>Well... So whose is this bug? =) Upstream systemd or Arch Linux's version of systemd (and dropbox's maintainer for AUR's dropbox service file)?
Neither.

> Most of them contain "%I" (like AUR's dropbox service file).
Then most of them are wrong.

Loading...