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

Francis Moreau francis.moro at gmail.com
Mon Nov 9 06:17:07 PST 2015


On Sun, Nov 8, 2015 at 9:38 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> 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...
>

I see.

It's just from the point of view of a (dumb) user, this behaviour
looked inconsistent. But I can use SetUnitProperties().

Thanks.
-- 
Francis


More information about the systemd-devel mailing list