[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/4] Add support for systemd cgroup mount



On 07/30/2013 12:49 PM, Daniel P. Berrange wrote:
> On Tue, Jul 30, 2013 at 12:13:58PM -0600, Eric Blake wrote:
>> On 07/26/2013 09:48 AM, Daniel P. Berrange wrote:
>>> From: "Daniel P. Berrange" <berrange redhat com>
>>>
>>> Systemd uses a named cgroup mount for tracking processes. Add
>>> it as another type of controller, albeit one which we have to
>>> special case in a number of places. In particular we must
>>> never create/delete directories there, nor add tasks. Essentially
>>> the systemd mount is to be considered read-only for libvirt.
>>>
>>> Signed-off-by: Daniel P. Berrange <berrange redhat com>

>>> -    }
>>> +    /* In some cases we can copy part of the placement info
>>> +     * based on the parent cgroup...
>>> +     */
>>> +    if ((parent || path[0] == '/') &&
>>> +        virCgroupCopyPlacement(group, path, parent) < 0)
>>> +        return -1;
>>> +
>>> +    /* ... but use /proc/cgroups to fill in the rest */
>>> +    if (virCgroupDetectPlacement(group, pid, path) < 0)
>>
>> ...now, if virCgroupCopyPlacement returns 0, it calls both functions.
>> Is that intentional?
> 
> Yes, when we use CopyPlacement it sets up all mounts, except for
> the systemd mount, which we must always probe for. The DetectPlacement
> method was changed so that it only fills in data, not already filled
> in by CopyPlacement.

That explains it, then.  Probably worth mentioning in the commit
message, so the next reader won't miss it like I did.  Condition has
been met, ACK is now granted with the typo fixes.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]