[systemd-devel] [PATCH] core: downgrade unit type not supported message
Lennart Poettering
lennart at poettering.net
Sun Mar 1 03:43:52 PST 2015
On Wed, 25.02.15 05:39, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> On Fri, Feb 20, 2015 at 10:53:28AM +0100, Umut Tezduyar Lindskog wrote:
> > Otherwise every daemon reload prints out warnings like:
> >
> > systemd[1]: Unit type .busname is not supported on this system.
> > systemd[1]: Unit type .swap is not supported on this system.
> > ---
> > src/core/manager.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/core/manager.c b/src/core/manager.c
> > index 4775219..bc9b7ec 100644
> > --- a/src/core/manager.c
> > +++ b/src/core/manager.c
> > @@ -961,7 +961,7 @@ int manager_enumerate(Manager *m) {
> > int q;
> >
> > if (unit_vtable[c]->supported && !unit_vtable[c]->supported(m)) {
> > - log_info("Unit type .%s is not supported on this system.", unit_type_to_string(c));
> > + log_debug("Unit type .%s is not supported on this system.", unit_type_to_string(c));
> > continue;
>
> I think it is correct to print this warning at least once. If unsupported
> units are packaged or created by the admin, this is a sign of some mistake.
> Maybe the warning should be printed only once?
The message is currently printed for every single unit type that isn't
supported, regardless if there's actually a unit of that type
around. Hence I have commited Umut's patch now.
In cases where a unit of an unsupported type is strted we already will
show an error in the usual status output, hence I think we are good
here.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list