Community Packages

Please read this before reporting a bug:

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

REPEAT: Do NOT report bugs for outdated packages!

FS#61078 - [lxc] lxc@<containername>.service fails to load after upgrade to 3.1.0

Attached to Project: Community Packages
Opened by Savyasachee Jha (savyajha) - Friday, 14 December 2018, 21:59 GMT
Last edited by Balló György (City-busz) - Friday, 12 April 2019, 15:05 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 7
Private No


After the upgrade from 3.0.3 -> 3.1.0, it's not possible to start an Alpine Linux container using systemd as described in the wiki. The container exits almost immediately after starting and there's nothing in the logs. A downgrade fixes it immediately.

There's no problem using lxc-start from the command line to start the container.

Additional info:
* package version(s): 1:3.0.3-1

Steps to reproduce:
- Install lxc-1:3.0.3-1 from the repos
- Follow steps in wiki to use unprivileged containers
- Create unprivileged Alpine Linux container
- Run said container using lxc@<name>.service (it runs)
- Upgrade package to 1:3.1.0-1
- Try "systemctl start lxc@<name>.service" again
- It exits after starting
This task depends upon

Comment by Moritz Bunkus (mbunkus) - Saturday, 15 December 2018, 21:07 GMT
Same for me with an Arch container. Interestingly I can start the same container manually with the same command used by the service file, "lxc-start -d -n mycontainername".
Comment by John (graysky) - Sunday, 16 December 2018, 14:02 GMT

The solution is to change our service unit to the attached.
Comment by Savyasachee Jha (savyajha) - Sunday, 16 December 2018, 14:17 GMT
Worked out for me. Perhaps just push this change to the repos and we're done. For a patch job until this is fixed officially, just create the file /etc/systemd/system/lxc@.service.d/override.conf with the following contents:

ExecStart=/usr/bin/lxc-start -d -p /run/ -n %i

That should tide us over while we wait for the change to be pushed.
Comment by John (graysky) - Sunday, 16 December 2018, 14:21 GMT
@savyajha - Thanks for the independent confirmation. We just need to replace our unit and bump the pkgver

BTW, you can run `systemctl edit lxc@` to get systemd to open your editor for you for overrides... see the wiki.
Comment by Moritz Bunkus (mbunkus) - Sunday, 16 December 2018, 14:28 GMT
Adding the PID file handling fixes it for me, too.