[ClusterLabs] Strange monitor return code log for LSB resource
jpokorny at redhat.com
Mon Jul 8 10:07:02 EDT 2019
On 05/07/19 03:50 +0000, Harvey Shepherd wrote:
> I was able to resolve an issue which caused these logs to disappear.
> The problem was that the LSB script was named "logging" and the
> daemon that it controlled was also called "logging". The init script
> uses "start-stop-daemon --name" to start and stop the logging
> daemon, but "start-stop-daemon --stop --name logging" was causing
> both the init script and daemon to be terminated, and hence an error
> code would be returned for the stop operation.
Oh, that's nasty, indeed. Incidentally, was just recently reminding
that /proc based traversals are rather betraying, for multiple
reasons, on developers counterpart list:
You've provided another example how relatively easy is for
people to shoot in their feet when process is specified
inprecisely/vaguely/in alias-prone ways. It's something you
want to avoid where practically feasible.
> I have no idea why crm_resource logs were produced, or why the logs
> seemed to indicate that that it was treating an LSB resource as OCF
> (expected return code of 7 - not running), but the logs were no
> longer generated once I renamed the init script.
This deserves a little correction here: "not running" is not exclusive
to OCF class of resources -- it's defined also for LSB init scripts as
such, althought admittedly not (officially) for "status" operation
) so the fact pacemaker tolerantly interprets it at all may be solely
so as to get along buggy (non-compliant) LSB init scripts, such as
the one that "crm_resource" was trying to monitor in your logs :-p
Anyway, good that you got rid of said phantom executions.
Should it recidivate, you can use the described trick to nail it down.
> I've not seen them since. There were definitely no external
> monitoring tools installed or in use (it's a very isolated system
> with very few resources installed), although I was using crm_monitor
> at the time. Does that run crm_resource under the hood?
AFAIK, there's no connection like that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Users