HomeClusterLabs Projects

pgsql: pgsql_status: silence ERROR: command failed: runuser ...

Description

pgsql: pgsql_status: silence ERROR: command failed: runuser ...

pgsql uses kill -s 0 $pid to check if the expected pid (still) exists.
If it does not exist, as is the case during stop, or with a stale pid file,
we get this "ERROR: command failed:" ... message.

Which carries no meaningful signal, and apparently scares some users,
because, well, "ERROR".

After we added support for the "debug" log level
to ocf_run() and now to pgsql runasowner(),
we can reduce the log level to debug.

Also drop the redirection to /dev/null,
so in case someone does enable debug level logging,
they can distinguish between "No such process" and "Operation not permitted".

Details

Provenance
Lars Ellenberg <lars.ellenberg@linbit.com>Authored on Jun 13 2024, 9:45 AM
Parents
rRb381f5e81a86: ocf-shellfuncs: ocf_run(): add debug level error logging
Branches
Unknown
Tags
Unknown

Event Timeline

Lars Ellenberg <lars.ellenberg@linbit.com> committed rRf62e2fdf69b3: pgsql: pgsql_status: silence ERROR: command failed: runuser ... (authored by Lars Ellenberg <lars.ellenberg@linbit.com>).Jun 19 2024, 7:44 AM