Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291364 - sys-apps/openrc: add support for LXC (Linux containers)
Summary: sys-apps/openrc: add support for LXC (Linux containers)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-31 20:13 UTC by Petr Polezhaev
Modified: 2010-12-22 16:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
files/0.5.2/0006-add-lxc-support.patch (0006-add-lxc-support.patch,4.38 KB, patch)
2009-10-31 20:15 UTC, Petr Polezhaev
Details | Diff
Fixes an issue with RHEL6 OpenVZ kernel being detected as LXC Container (lxc-openvz-detection.patch,606 bytes, patch)
2010-12-21 20:18 UTC, Oliver Schmidt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Polezhaev 2009-10-31 20:13:48 UTC
Mirrored from: http://roy.marples.name/projects/openrc/ticket/202

This is patch for adding LXC ( http://lxc.sourceforge.net/) detection and '-lxc' keyword into some init.d scripts.

Most of scripts made as-in-openvz, but there is some questions with modules (they could be, or couldn't be modprobe'd depending of what tool are you using (lxc or libvirt)) procfs (which is trying to modprobe usb) and some others.
Comment 1 Petr Polezhaev 2009-10-31 20:15:13 UTC
Created attachment 208895 [details, diff]
files/0.5.2/0006-add-lxc-support.patch
Comment 2 SpanKY gentoo-dev 2009-11-01 19:52:01 UTC
you realize "LXC containers" is redundant right ? :p
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-11-01 22:27:04 UTC
hush hush, it's just RAS Syndrome.
Comment 4 Petr Polezhaev 2009-11-04 19:34:20 UTC
Upstream applies patch. Should it be added into tree for current release?
Comment 5 SpanKY gentoo-dev 2009-11-04 20:36:03 UTC
i dont think it's a critical issue and a new release should be out soonish ...
Comment 6 Oliver Schmidt 2010-12-21 20:18:47 UTC
Created attachment 257706 [details, diff]
Fixes an issue with RHEL6 OpenVZ kernel being detected as LXC Container

This patch fixes an issue I have found while testing the new OpenVZ RHEL6 kernel on a machine with OpenRC 0.6.8 on it. 

Problem: new OpenVZ code uses cgroups now, too (as LXC does). rc detects host as LXC container as /proc/self/cgroup has content matching the regex in test (inside of librc.c system detection code). Host machine does not boot correctly as some services are not started because of false LXC detection.

Solution: the patch adds some conditions to the LXC check. This is a quick fix, as it only looks out for some typical OpenVZ files inside /proc.

Remaining issues: It would be a more appropriate solution, if the LXC check would be more LXC specific and not just a quick look into /proc/self/cgroup. Perhaps someone with more LXC experience has a good hint for this?
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-12-21 20:29:40 UTC
Posting patches to a closed bug does not help. Please open a new bug instead.
Comment 8 Oliver Schmidt 2010-12-22 16:23:44 UTC
(In reply to comment #7)
> Posting patches to a closed bug does not help. Please open a new bug instead.
> 

Ok, I opened a new one: http://bugs.gentoo.org/show_bug.cgi?id=349389