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

Lennart Poettering lennart at poettering.net
Wed Apr 1 06:11:42 PDT 2015


On Wed, 01.04.15 14: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)?

A runtime fallback from ListUnitsFiltered() to old ListUnits() should
the former result in an error that the method call is unavailable.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list