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#38277 - [lxc] Add systemd service file, change the URL/src link, and prepare for 1.0.0

Attached to Project: Community Packages
Opened by Leonid Isaev (lisaev) - Wednesday, 25 December 2013, 21:13 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 26 December 2013, 09:57 GMT
Task Type Feature Request
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

Currently, the lxc package ships a "bare-bones" toolset and contains some inaccuracies. I think this can be improved in several ways.

1. Add a systemd service template (lxc@.service). The attached file is taken from the archwiki LXC page except that it does not contain ExecStartPre which remounts / rprivate. The latter is not needed anymore and lxc starts OK without it. The PKGBUILD change is:

install -D -m644 ${srcdir}/lxc@service ${pkgdir}/usr/lib/systemd/system/lxc@service

2. The LXC project has moved from SF to linuxcontainers.org and github. The new URL is "http://linuxcontainers.org" and stable tarballs are at "http://linuxcontainers.org/downloads/$pkgname-${pkgver}.tar.gz".

3. LXC needs that memory cgroup hierachical accounting is enabled, i.e. /sys/fs/cgroup/memory/memory.use_hierarchy is 1. It is 0 by default. Upstream, there is commit 1ea59a which makes lxc write 1 to that file. However, this feature will only be in lxc 1.0 (it was commited ono Oct 25), and now there is a kernel warning each time a container is started. This can be worked around by using a systemd tmpfile config (attached lxc.tmpfiles.d):

install -D -m644 ${srcdir}/lxc.tmpfiles.d ${pkgdir}/usr/lib/tmpfiles.d/lxc.conf

This config can be dropped in 1.0, but even if it's not there seems to be no harm (at least I see no problems running 1.0.0.beta1 with it).

4. There is an incompatibility coming with 1.0.0. The lxc-shutdown binary is gone and lxc-stop changes behavior: new lxc-stop -n ... = lxc-shutdown -n ... (sigpwr is sent to systemd inside container), new lxc-stop -k -n ... = old lxc-stop -n ... (lxc.stopsignal is sent). It took me some time to figure out why systemctl times out on container shutdown. Perhaps, this change can be advertised in the future update 0.9.0 -> 1.0.0, see the attached .install file. Of course, lxc@.service will have to be adjusted as well.

Thanks.
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 26 December 2013, 09:57 GMT
Reason for closing:  Fixed

Loading...