Re: [ClusterLabs] Howto restart resource

2016-08-29 Thread Klaus Wenninger
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_ANode_B
>> Resource1Resource1
>> Resource2Resource2
>> Resource3Resource3
>> 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


Re: [ClusterLabs] Howto restart resource

2016-08-29 Thread Ken Gaillot
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_ANode_B
> Resource1Resource1
> Resource2Resource2
> Resource3Resource3
> 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;

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


[ClusterLabs] Howto restart resource

2016-08-29 Thread Stefano Ruberti
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_ANode_B
Resource1Resource1
Resource2Resource2
Resource3Resource3
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



___
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


[ClusterLabs] Howto restart resource

2016-08-09 Thread Stefano Ruberti
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_ANode_B
Resource1Resource1
Resource2Resource2
Resource3Resource3
rsyslogd rsyslogd   

1. is possible to configure a restart of rsyslogd when node (Node_A or Node_B) 
go on-line and take resource? 


Best Regards
Stefano



___
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