Re: [vserver] Systemd and EL7

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Sat 14 Feb 2015 - 09:03:00 GMT
Message-ID: <20150214090300.GD1230@MAIL.13thfloor.at>

On Fri, Feb 13, 2015 at 05:57:51PM +0100, Carlos Alberto Lopez Perez wrote:
> On 13/02/15 17:28, Herbert Poetzl wrote:
>> On Fri, Feb 13, 2015 at 03:12:28PM +0100, Carlos Alberto Lopez Perez wrote:
>>> On 14/01/15 22:52, Herbert Poetzl wrote:
>>>> I think the main problem is that systemd doesn't do proper
>>>> logging when something goes wrong, an so it becomes very
>>>> tricky to debug.

>>>> If you tell me what fails and why it fails, then it is
>>>> probably very simple to add this or that exception to the
>>>> Linux-VServer patches to "make it work".

>>> AFAIK systemd has to be taught to detect containers, so it
>>> stop doing things that are not permitted or don't make sense
>>> when running inside a container.

>>> And it seems to me that still nobody implemented the support
>>> for detecting vserver containers:

>>> http://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html

>>> As you can see, there is support for many containers but vserver.

>> But this suggests, that you can simply replace the
>> systemd-detect-virt binary with a script which prints
>> Linux-VServer and exits with 0 (success).

> Not sure, after grepping the systemd sources it seems that the
> detection happens here:

> http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/virt.c?id=d831deb512ab1d11aab156f69620db506c554170#n272

> int detect_container(const char **id);

well, according to the code, pid=1 (i.e. plain init style)
and an environment variable called "container" should
suffice then (lines 298-306), or alternatively a file
in /run/systemd called containter.

Best,
Herbert
Received on Sat Feb 14 09:03:11 2015

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 14 Feb 2015 - 09:03:11 GMT by hypermail 2.1.8