journald: proceed even if some sockets are unknown

systemd-journald would refuse to start if it received an unknown
socket from systemd. This is annoying, because the failure more for
systemd-journald is unpleasant: systemd will keep restarting journald,
but most likely the same error will occur every time. It is better
to continue. journald will try to open missing sockets on its own,
so things should mostly work.

One question is whether to close the sockets which cannot be parsed or
to keep them open. Either way we might lose some messages. This
failure is most likely for the audit socket (selinux issues), which
can be opened multiple times so this not a problem, so I decided to
keep them open because it makes it easier to debug the issue after the
system is fully started.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-11-26 15:05:55 -05:00
parent 5607d856b8
commit 3d82301321

View file

@ -1566,10 +1566,8 @@ int server_init(Server *s) {
s->audit_fd = fd;
} else {
log_error("Unknown socket passed.");
return -EINVAL;
}
} else
log_error("Unknown socket passed as file descriptor %d, ignoring.", fd);
}
r = server_open_syslog_socket(s);