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

2015-11-09 Thread Francis Moreau
On Sun, Nov 8, 2015 at 9:38 PM, Lennart Poettering
 wrote:
> On Fri, 06.11.15 18:38, Francis Moreau (francis.m...@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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2015-11-08 Thread Lennart Poettering
On Fri, 06.11.15 18:38, Francis Moreau (francis.m...@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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2015-11-06 Thread Francis Moreau
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 ?

Thanks
-- 
Francis
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel