mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Do not fail to start the daemon if no crypto counters are supported, as
there is still a use case for the daemon to run, as the user can then
use the 'cpacfstats' tool to evaluate that no counter stats are
available. Previously, the user had to check the syslogs for the reason
why the daemon was not running and the cpacfstats command failed.
Before this change:
$ cpacfstats
cpacfstats: Can't access domain socket file '/run/cpacfstatsd_socket', errno=2 [No such file or directory]
cpacfstats: Maybe cpacfstatsd daemon is not running ???
cpacfstats: Can't connect to daemon
After this change:
$ cpacfstats
des counter: unsupported
aes counter: unsupported
sha counter: unsupported
rng counter: unsupported
ecc counter: unsupported
pai_user : unsupported
pai_kernel : unsupported
Also, it's no good practice to let systemd services fail, because
otherwise the system state will be shown as 'degraded':
$ systemctl status
* a46lp59
State: degraded
Jobs: 0 queued
Failed: 1 units
$ systemctl list-units --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
* cpacfstatsd.service loaded failed failed CPACF statistics collection daemon process for Linux on System z
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>