Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#38903 - lxc@.service file does not work with dashes in container name

Attached to Project: Community Packages
Opened by Florian Klink (flokli) - Thursday, 13 February 2014, 16:39 GMT
Last edited by Sergej Pupykin (sergej) - Friday, 14 February 2014, 09:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Created lxc container config in /var/lib/lxc/foo-bar/config

Tried to start container:


# systemctl start lxc@foo-bar
Job for lxc@foo-bar.service failed. See 'systemctl status lxc@foo-bar.service' and 'journalctl -xn' for details.


# systemctl status lxc@foo-bar.service
lxc@foo-bar.service - foo/bar LXC
Loaded: loaded (/usr/lib/systemd/system/lxc@.service; disabled)
Active: failed (Result: exit-code) since Thu 2014-02-13 17:25:30 CET; 5s ago
Process: 20881 ExecStart=/usr/bin/lxc-start -d -n %I (code=exited, status=255)

Feb 13 17:25:30 dedi1 systemd[1]: Starting foo/bar LXC...
Feb 13 17:25:30 dedi1 lxc-start[20881]: lxc-start: no configuration file for '/sbin/init' (may crash the host)
Feb 13 17:25:30 dedi1 systemd[1]: lxc@foo-bar.service: control process exited, code=exited status=255
Feb 13 17:25:30 dedi1 systemd[1]: Failed to start foo/bar LXC.
Feb 13 17:25:30 dedi1 systemd[1]: Unit lxc@foo-bar.service entered failed state.

Failed to start foo/bar LXC.


The problem is in /usr/lib/systemd/system/lxc@.service. All occurences of %I need to be replaced with %i, then it works as expected.

(See also https://bugs.archlinux.org/task/37755#comment116424:

[...] 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).

)
This task depends upon

Closed by  Sergej Pupykin (sergej)
Friday, 14 February 2014, 09:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  %I were replaced to %i

Loading...