This is related to http://bugs.gentoo.org/show_bug.cgi?id=291364 My 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? Reproducible: Always Steps to Reproduce: 1. Install OpenVZ RHEL6 Kernel 2. Boot into kernel on machine with OpenRC as init System Actual Results: rc -S show LXC -> system is detected as LXC container and the boot process is not done right (no root/localmount/... service started as specified in OpenRC for LXC-container) Expected Results: Boot correctly this host machine...
Created attachment 257770 [details, diff] Fixes an issue with RHEL6 OpenVZ kernel being detected as LXC Container
Also related to bug #347583 (task groups cgroups confused with LXC). If the /manual/ keyword setting solution under discussion there is implemented, this bug will be fixed as well. Conversely, the patch suggested here could fix that one too. So in addition to both bugs blocking bug #295613 (openrc stabilization tracker), perhaps one should depend on or dup the other?
Fixed in Git as of 3d4d1ab1. Please test the 9999 ebuild.