[ClusterLabs] resource actions influence outside of configured resources - how

Ken Gaillot kgaillot at redhat.com
Thu Dec 13 13:37:28 EST 2018


On Thu, 2018-12-13 at 18:14 +0000, lejeczek wrote:
> hi guys,
> 
> apologies for probably not explaining myself clearly enough.
> 
> I'd like to ask how you achieve a situation where resource when 
> started/stopped pokes something which "is not" in configured cluster?
> 
> With me it is a case where systemd service I'd like to get 
> reloaded/restarted(on the same node where) when cluster resource
> starts 
> or stops.

Is there a reason not to use pacemaker's native systemd resource
support? If the resource agent is specified as "systemd:<servicename>",
(the service should NOT be enabled from systemd's perspective),
pacemaker will use systemd (via dBus) to start, stop, and monitor the
service.

If your "poke" is more in-depth than systemd's simple status check,
that's a topic that's come up before, without a straightforward
solution. The best approach is a nagios check resource, with the
"container" meta-attribute set to the systemd service. If the nagios
check's recurring monitor fails, the systemd service will be restarted
instead of the nagios check itself. You could write a regular OCF
resource agent instead of a nagios check if desired, and use it the
same way.

> 
> I'm on Centos 7.x so systemd's function where I could propagateFrom
> is 
> not available. Surely there are ways to get this behavior via means 
> outside of cluster but it would be great to have all done "inside"
> of 
> cluster.
> 
> I read there are alerts, or would be some scripts agents, I'm not
> sure.
> 
> many thanks, L.




More information about the Users mailing list