[systemd-devel] Property 'MemoryLimit' is RO when using the D-Bus API

Lennart Poettering lennart at poettering.net
Sun Nov 8 12:38:21 PST 2015


On Fri, 06.11.15 18:38, Francis Moreau (francis.moro at gmail.com) wrote:

> Hi,
> 
> I'm trying to change the MemoryLimit property of one the service unit
> running on my system by using 'busctl set-property ...' but getting
> the following error :
> 
>    Property 'MemoryLimit' is not writable.
> 
> However using 'systemctl set-property' works as expected.
> 
> I thought that 'systemctl set-property' was basically doing the same
> D-Bus thing like my former test did but apparently not.
> 
> Could anybody enlight me why I can't use busctl to set the MemoryLimit
> property  and why 'systemctl set-property' gives a different result ?

We never hooked that up, that's all..

So, in systemd we have an explicit call SetUnitProperties() that is
independent of the dbus-mandated Set() calls for the Properties
interface. We do this mostly to allow atomic changes to multiple
properties but also to be a step closer to unit file behaviour
regarding assigning lists of settings to a property, so that it's easy
to extend ratehr than reset properties that take lists.

In all our tools we use SetUnitProperties() exclusively, since it has
nicer behaviour. We never thought of hooking up Set() too... but if
figure it might make sense to do that too, so i'd be happy to take a patch...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list