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

Eric Blake eblake at redhat.com
Tue Jul 30 18:57:55 UTC 2013


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 at 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 at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130730/13876c4e/attachment-0001.sig>


More information about the libvir-list mailing list