Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_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#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 Sergej Pupykin (sergej) - Friday, 17 April 2020, 00:50 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 11
Private No

Details

Description:
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

Closed by  Sergej Pupykin (sergej)
Friday, 17 April 2020, 00:50 GMT
Reason for closing:  Fixed
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
https://github.com/lxc/lxc/issues/2754

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:

[Service]
PIDFile=/run/lxc-%i.pid
ExecStart=
ExecStart=/usr/bin/lxc-start -d -p /run/lxc-%i.pid -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 https://git.archlinux.org/svntogit/community.git/tree/trunk/lxc.service?h=packages/lxc

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.
Comment by MikeS (MS1) - Sunday, 28 July 2019, 09:56 GMT
@Sergej Pupykin: will you replace the wrong service file with this one? I found this with googling and it solved my issue.
Comment by Cedric Bellegarde (gnumdk) - Friday, 11 October 2019, 06:37 GMT
Can confirm than now  FS#63277  is fixed, I'm having this issue.
Comment by John (graysky) - Friday, 11 October 2019, 18:06 GMT
@gnumdk - I believe that the fix for this FS is to simply use the override I describe above until Segej updates our service file with one I attached to the ticket. Why are you referencing a totally different FS and in the same sentence, confirm you are also affected by this bug?
Comment by Cedric Bellegarde (gnumdk) - Sunday, 13 October 2019, 18:49 GMT
Yes I'm also affected by this bug, sorry for the link to other bug report.
Comment by Squiddo (squiddo) - Monday, 27 January 2020, 00:57 GMT
I'm still carrying this fix along. The original issue from github was closed recently as an Arch-only issue. Would a patch against Arch's unit file be the next step?
Comment by John (graysky) - Thursday, 26 March 2020, 06:14 GMT
@squiddo - Can you confirm that the service file I posted here on Sunday, 16 December 2018 fixes your issue?
Comment by Squiddo (squiddo) - Thursday, 26 March 2020, 22:03 GMT
@graysky - yours is the correct fix.
Comment by Evgeniy (evgeniy) - Thursday, 16 April 2020, 21:34 GMT
Still issue with lxc 4.0.1, and it is still fixed via editing of lxc@.service.
Any reason to not incorporate this fix, @spupykin / @sergej ?

Loading...