[systemd-devel] [PATCH] systemctl: list-units -r should not fail with older systemd in container

Dimitri John Ledkov dimitri.j.ledkov at intel.com
Wed Apr 1 06:08:14 PDT 2015


On 1 April 2015 at 13:44, Lukáš Nykrýn <lnykryn at redhat.com> wrote:
> Lennart Poettering píše v Út 31. 03. 2015 v 19:28 +0200:
>> On Tue, 31.03.15 16:10, Lukas Nykryn (lnykryn at redhat.com) wrote:
>>
>> > Older version of systemd does not have d-bus method "ListUnitsFiltered",
>> > so systemctl -r will fail just with:
>>
>> I think I'd really prefer if we'd simply fall back to ListUnits() in
>> this case, and do the filtering client side only. In fact that's
>> probably what we should have done in the first place anyway.
>>
>> I figure the patch to make this happen shouldn't be too complex,
>> especially given that the original code did just that?
>>
>> Lennart
>>
> I am not sure if I understand your suggestion correctly, fall back in
> the case that the machine does not have"ListUnitsFiltered" or basically
> revert the original patch, which changed that (but leave the new dbus
> method)?

Keep current code path as default, if ListUnitsFiltered is available.

Revert old code path, but make it a fallback code path when
ListUnitsFiltered is not available.

-- 
Regards,

Dimitri.

https://clearlinux.org
Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.


More information about the systemd-devel mailing list