On 08/29/2016 04:03 PM, Ken Gaillot wrote: > On 08/29/2016 01:38 AM, Stefano Ruberti wrote: >> Dear all, >> >> I have following situation and I need an advice from you: >> >> in my Active/Passive Cluster (Ubuntu_16.04 corosync + pacemaker , no pcs) >> >> Node_A Node_B >> Resource1 Resource1 >> Resource2 Resource2 >> Resource3 Resource3 >> rsyslogd rsyslogd >> >> 1. is possible to configure rsyslogd to restarting when node (Node_A or >> Node_B) go on-line and take resource? >> >> >> Best Regards >> Stefano > Is rsyslogd a cluster resource? That might not be ideal, since pacemaker > itself needs to use syslog (unless you've configured it not to), and you > probably want syslog running even if the cluster services are stopped > (for an upgrade, for example). > > If your goal is simply to reload rsyslogd when a resource state changes, > I would think one of these approaches would be suitable: > > Use the new alerts interface (pacemaker 1.1.15+) with an alert script > that reloads rsyslogd at the desired events;
Be aware that you are not root right away inside these alert-scripts! > > Or, write a custom resource agent that reloads rsyslogd, and set up > colocation/ordering constraints between it and the desired resources. > Pacemaker will then "start" it after starting the resources, and "stop" > it before stopping the resources. Note that the agent must know whether > it is "running", and there is a ha_pseudo_resource() function in the OCF > libraries to handle that. > > _______________________________________________ > Users mailing list: Users@clusterlabs.org > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org _______________________________________________ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org