Re: [ClusterLabs] Antw: Re: Notification agent and Notification recipients

2017-08-15 Thread Sriram
Thanks for clarifying.

Regards,
Sriram.

On Mon, Aug 14, 2017 at 7:34 PM, Klaus Wenninger 
wrote:

> On 08/14/2017 03:19 PM, Sriram wrote:
>
> Yes, I had precreated the script file with the required permission.
>
> [root@*node1* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
> -rwxr-xr-x. 1 root root 4140 Aug 14 01:51 /usr/share/pacemaker/alert_
> file.sh
>  [root@*node2* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
> -rwxr-xr-x. 1 root root 4139 Aug 14 01:51 /usr/share/pacemaker/alert_
> file.sh
> [root@*node3* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
> -rwxr-xr-x. 1 root root 4139 Aug 14 01:51 /usr/share/pacemaker/alert_
> file.sh
>
> Later I observed that user "hacluster" is not able to create the log file
> under /usr/share/pacemaker/alert_file.log.
> I am sorry, I should have observed this in the log before posting the
> query. Then I gave the path as /tmp/alert_file.log, it is able to create
> now.
> Thanks for pointing it out.
>
> I have one more clarification,
>
> if the resource is running in node2,
> [root@node2 tmp]# pcs resource
>  TRR(ocf::heartbeat:TimingRedundancyRA):Started node2
>
> And I executed the below command to make it standby.
> [root@node2 tmp] # pcs node standby node2
>
> Resource shifted to node3, because of higher location constraint.
> [root@node2 tmp]# pcs resource
>  TRR(ocf::heartbeat:TimingRedundancyRA):Started node3.
>
>
> I got the log file created under node2(resource stopped) and
> node3(resource started).
>
> Node1 was not notified about the resource shift, I mean no log file was
> created there.
> Its because alerts are designed to notify the external agents about the
> cluster events. Its not for internal notifications.
>
> Is my understanding correct ?
>
>
> Quite simple: crmd of node1 just didn't have anything to do with shifting
> the resource
> from node2 -> node3. There is no additional information passed between the
> nodes
> just to create a full set of notifications on every node. If you want to
> have a full log
> (or whatever you altert-agent is doing) in one place this would be up to
> your alert-agent.
>
>
> Regards,
> Klaus
>
>
> Regards,
> Sriram.
>
>
>
> On Mon, Aug 14, 2017 at 5:42 PM, Klaus Wenninger 
> wrote:
>
>> On 08/14/2017 12:32 PM, Sriram wrote:
>>
>> Hi Ken,
>>
>> I used the alerts as well, seems to be not working.
>>
>> Please check the below configuration
>> [root@node1 alerts]# pcs config show
>> Cluster Name:
>> Corosync Nodes:
>> Pacemaker Nodes:
>>  node1 node2 node3
>>
>> Resources:
>>  Resource: TRR (class=ocf provider=heartbeat type=TimingRedundancyRA)
>>   Operations: start interval=0s timeout=60s (TRR-start-interval-0s)
>>   stop interval=0s timeout=20s (TRR-stop-interval-0s)
>>   monitor interval=10 timeout=20 (TRR-monitor-interval-10)
>>
>> Stonith Devices:
>> Fencing Levels:
>>
>> Location Constraints:
>>   Resource: TRR
>> Enabled on: node1 (score:100) (id:location-TRR-node1-100)
>> Enabled on: node2 (score:200) (id:location-TRR-node2-200)
>> Enabled on: node3 (score:300) (id:location-TRR-node3-300)
>> Ordering Constraints:
>> Colocation Constraints:
>> Ticket Constraints:
>>
>> Alerts:
>>  Alert: alert_file (path=/usr/share/pacemaker/alert_file.sh)
>>   Options: debug_exec_order=false
>>   Meta options: timeout=15s
>>   Recipients:
>>Recipient: recipient_alert_file_id (value=/usr/share/pacemaker/al
>> ert_file.log)
>>
>>
>> Did you pre-create the file with proper rights? Be aware that the
>> alert-agent
>> is called as user hacluster.
>>
>>
>> Resources Defaults:
>>  resource-stickiness: INFINITY
>> Operations Defaults:
>>  No defaults set
>>
>> Cluster Properties:
>>  cluster-infrastructure: corosync
>>  dc-version: 1.1.15-11.el7_3.4-e174ec8
>>  default-action-timeout: 240
>>  have-watchdog: false
>>  no-quorum-policy: ignore
>>  placement-strategy: balanced
>>  stonith-enabled: false
>>  symmetric-cluster: false
>>
>> Quorum:
>>   Options:
>>
>>
>> /usr/share/pacemaker/alert_file.sh does not get called whenever I
>> trigger a scenario for failover.
>> Please let me know if I m missing anything.
>>
>>
>> Do you get any logs - like for startup of resources - or nothing at all?
>>
>> Regards,
>> Klaus
>>
>>
>>
>>
>> Regards,
>> Sriram.
>>
>> On Tue, Aug 8, 2017 at 8:29 PM, Ken Gaillot  wrote:
>>
>>> On Tue, 2017-08-08 at 17:40 +0530, Sriram wrote:
>>> > Hi Ulrich,
>>> >
>>> >
>>> > Please see inline.
>>> >
>>> > On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl
>>> >  wrote:
>>> > >>> Sriram  schrieb am 08.08.2017 um
>>> > 09:30 in Nachricht
>>> > 

Re: [ClusterLabs] Antw: Re: Notification agent and Notification recipients

2017-08-14 Thread Klaus Wenninger
On 08/14/2017 03:19 PM, Sriram wrote:
> Yes, I had precreated the script file with the required permission. 
>
> [root@*node1* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
> -rwxr-xr-x. 1 root root 4140 Aug 14 01:51
> /usr/share/pacemaker/alert_file.sh
>  [root@*node2* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
> -rwxr-xr-x. 1 root root 4139 Aug 14 01:51
> /usr/share/pacemaker/alert_file.sh
> [root@*node3* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
> -rwxr-xr-x. 1 root root 4139 Aug 14 01:51
> /usr/share/pacemaker/alert_file.sh
>
> Later I observed that user "hacluster" is not able to create the log
> file under /usr/share/pacemaker/alert_file.log.
> I am sorry, I should have observed this in the log before posting the
> query. Then I gave the path as /tmp/alert_file.log, it is able to
> create now.
> Thanks for pointing it out.
>
> I have one more clarification,
>
> if the resource is running in node2,
> [root@node2 tmp]# pcs resource
>  TRR(ocf::heartbeat:TimingRedundancyRA):Started node2
>
> And I executed the below command to make it standby.
> [root@node2 tmp] # pcs node standby node2
>
> Resource shifted to node3, because of higher location constraint.
> [root@node2 tmp]# pcs resource
>  TRR(ocf::heartbeat:TimingRedundancyRA):Started node3.
>
>
> I got the log file created under node2(resource stopped) and
> node3(resource started). 
>
> Node1 was not notified about the resource shift, I mean no log file
> was created there.
> Its because alerts are designed to notify the external agents about
> the cluster events. Its not for internal notifications.
>
> Is my understanding correct ?

Quite simple: crmd of node1 just didn't have anything to do with
shifting the resource
from node2 -> node3. There is no additional information passed between
the nodes
just to create a full set of notifications on every node. If you want to
have a full log
(or whatever you altert-agent is doing) in one place this would be up to
your alert-agent.

Regards,
Klaus

>  
> Regards,
> Sriram.
>
>
>
> On Mon, Aug 14, 2017 at 5:42 PM, Klaus Wenninger  > wrote:
>
> On 08/14/2017 12:32 PM, Sriram wrote:
>> Hi Ken,
>>
>> I used the alerts as well, seems to be not working.
>>
>> Please check the below configuration
>> [root@node1 alerts]# pcs config show
>> Cluster Name:
>> Corosync Nodes:
>> Pacemaker Nodes:
>>  node1 node2 node3
>>
>> Resources:
>>  Resource: TRR (class=ocf provider=heartbeat type=TimingRedundancyRA)
>>   Operations: start interval=0s timeout=60s (TRR-start-interval-0s)
>>   stop interval=0s timeout=20s (TRR-stop-interval-0s)
>>   monitor interval=10 timeout=20
>> (TRR-monitor-interval-10)
>>
>> Stonith Devices:
>> Fencing Levels:
>>
>> Location Constraints:
>>   Resource: TRR
>> Enabled on: node1 (score:100) (id:location-TRR-node1-100)
>> Enabled on: node2 (score:200) (id:location-TRR-node2-200)
>> Enabled on: node3 (score:300) (id:location-TRR-node3-300)
>> Ordering Constraints:
>> Colocation Constraints:
>> Ticket Constraints:
>>
>> Alerts:
>>  Alert: alert_file (path=/usr/share/pacemaker/alert_file.sh)
>>   Options: debug_exec_order=false
>>   Meta options: timeout=15s
>>   Recipients:
>>Recipient: recipient_alert_file_id
>> (value=/usr/share/pacemaker/alert_file.log)
>
> Did you pre-create the file with proper rights? Be aware that the
> alert-agent
> is called as user hacluster.
>
>>
>> Resources Defaults:
>>  resource-stickiness: INFINITY
>> Operations Defaults:
>>  No defaults set
>>
>> Cluster Properties:
>>  cluster-infrastructure: corosync
>>  dc-version: 1.1.15-11.el7_3.4-e174ec8
>>  default-action-timeout: 240
>>  have-watchdog: false
>>  no-quorum-policy: ignore
>>  placement-strategy: balanced
>>  stonith-enabled: false
>>  symmetric-cluster: false
>>
>> Quorum:
>>   Options:
>>
>>
>> /usr/share/pacemaker/alert_file.sh does not get called whenever I
>> trigger a scenario for failover.
>> Please let me know if I m missing anything.
>
> Do you get any logs - like for startup of resources - or nothing
> at all?
>
> Regards,
> Klaus
>
>
>>
>>
>> Regards,
>> Sriram.
>>
>> On Tue, Aug 8, 2017 at 8:29 PM, Ken Gaillot > > wrote:
>>
>> On Tue, 2017-08-08 at 17:40 +0530, Sriram wrote:
>> > Hi Ulrich,
>> >
>> >
>> > Please see inline.
>> >
>> > On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl
>> > > > wrote:
>> > >>> Sriram > > schrieb am 08.08.2017
>>  um
>> >  

Re: [ClusterLabs] Antw: Re: Notification agent and Notification recipients

2017-08-14 Thread Sriram
Yes, I had precreated the script file with the required permission.

[root@*node1* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
-rwxr-xr-x. 1 root root 4140 Aug 14 01:51 /usr/share/pacemaker/alert_file.sh
 [root@*node2* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
-rwxr-xr-x. 1 root root 4139 Aug 14 01:51 /usr/share/pacemaker/alert_file.sh
[root@*node3* alerts]# ls -l /usr/share/pacemaker/alert_file.sh
-rwxr-xr-x. 1 root root 4139 Aug 14 01:51 /usr/share/pacemaker/alert_file.sh

Later I observed that user "hacluster" is not able to create the log file
under /usr/share/pacemaker/alert_file.log.
I am sorry, I should have observed this in the log before posting the
query. Then I gave the path as /tmp/alert_file.log, it is able to create
now.
Thanks for pointing it out.

I have one more clarification,

if the resource is running in node2,
[root@node2 tmp]# pcs resource
 TRR(ocf::heartbeat:TimingRedundancyRA):Started node2

And I executed the below command to make it standby.
[root@node2 tmp] # pcs node standby node2

Resource shifted to node3, because of higher location constraint.
[root@node2 tmp]# pcs resource
 TRR(ocf::heartbeat:TimingRedundancyRA):Started node3.


I got the log file created under node2(resource stopped) and node3(resource
started).

Node1 was not notified about the resource shift, I mean no log file was
created there.
Its because alerts are designed to notify the external agents about the
cluster events. Its not for internal notifications.

Is my understanding correct ?

Regards,
Sriram.



On Mon, Aug 14, 2017 at 5:42 PM, Klaus Wenninger 
wrote:

> On 08/14/2017 12:32 PM, Sriram wrote:
>
> Hi Ken,
>
> I used the alerts as well, seems to be not working.
>
> Please check the below configuration
> [root@node1 alerts]# pcs config show
> Cluster Name:
> Corosync Nodes:
> Pacemaker Nodes:
>  node1 node2 node3
>
> Resources:
>  Resource: TRR (class=ocf provider=heartbeat type=TimingRedundancyRA)
>   Operations: start interval=0s timeout=60s (TRR-start-interval-0s)
>   stop interval=0s timeout=20s (TRR-stop-interval-0s)
>   monitor interval=10 timeout=20 (TRR-monitor-interval-10)
>
> Stonith Devices:
> Fencing Levels:
>
> Location Constraints:
>   Resource: TRR
> Enabled on: node1 (score:100) (id:location-TRR-node1-100)
> Enabled on: node2 (score:200) (id:location-TRR-node2-200)
> Enabled on: node3 (score:300) (id:location-TRR-node3-300)
> Ordering Constraints:
> Colocation Constraints:
> Ticket Constraints:
>
> Alerts:
>  Alert: alert_file (path=/usr/share/pacemaker/alert_file.sh)
>   Options: debug_exec_order=false
>   Meta options: timeout=15s
>   Recipients:
>Recipient: recipient_alert_file_id (value=/usr/share/pacemaker/
> alert_file.log)
>
>
> Did you pre-create the file with proper rights? Be aware that the
> alert-agent
> is called as user hacluster.
>
>
> Resources Defaults:
>  resource-stickiness: INFINITY
> Operations Defaults:
>  No defaults set
>
> Cluster Properties:
>  cluster-infrastructure: corosync
>  dc-version: 1.1.15-11.el7_3.4-e174ec8
>  default-action-timeout: 240
>  have-watchdog: false
>  no-quorum-policy: ignore
>  placement-strategy: balanced
>  stonith-enabled: false
>  symmetric-cluster: false
>
> Quorum:
>   Options:
>
>
> /usr/share/pacemaker/alert_file.sh does not get called whenever I trigger
> a scenario for failover.
> Please let me know if I m missing anything.
>
>
> Do you get any logs - like for startup of resources - or nothing at all?
>
> Regards,
> Klaus
>
>
>
>
> Regards,
> Sriram.
>
> On Tue, Aug 8, 2017 at 8:29 PM, Ken Gaillot  wrote:
>
>> On Tue, 2017-08-08 at 17:40 +0530, Sriram wrote:
>> > Hi Ulrich,
>> >
>> >
>> > Please see inline.
>> >
>> > On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl
>> >  wrote:
>> > >>> Sriram  schrieb am 08.08.2017 um
>> > 09:30 in Nachricht
>> > 

Re: [ClusterLabs] Antw: Re: Notification agent and Notification recipients

2017-08-14 Thread Klaus Wenninger
On 08/14/2017 12:32 PM, Sriram wrote:
> Hi Ken,
>
> I used the alerts as well, seems to be not working.
>
> Please check the below configuration
> [root@node1 alerts]# pcs config show
> Cluster Name:
> Corosync Nodes:
> Pacemaker Nodes:
>  node1 node2 node3
>
> Resources:
>  Resource: TRR (class=ocf provider=heartbeat type=TimingRedundancyRA)
>   Operations: start interval=0s timeout=60s (TRR-start-interval-0s)
>   stop interval=0s timeout=20s (TRR-stop-interval-0s)
>   monitor interval=10 timeout=20 (TRR-monitor-interval-10)
>
> Stonith Devices:
> Fencing Levels:
>
> Location Constraints:
>   Resource: TRR
> Enabled on: node1 (score:100) (id:location-TRR-node1-100)
> Enabled on: node2 (score:200) (id:location-TRR-node2-200)
> Enabled on: node3 (score:300) (id:location-TRR-node3-300)
> Ordering Constraints:
> Colocation Constraints:
> Ticket Constraints:
>
> Alerts:
>  Alert: alert_file (path=/usr/share/pacemaker/alert_file.sh)
>   Options: debug_exec_order=false
>   Meta options: timeout=15s
>   Recipients:
>Recipient: recipient_alert_file_id
> (value=/usr/share/pacemaker/alert_file.log)

Did you pre-create the file with proper rights? Be aware that the
alert-agent
is called as user hacluster.

>
> Resources Defaults:
>  resource-stickiness: INFINITY
> Operations Defaults:
>  No defaults set
>
> Cluster Properties:
>  cluster-infrastructure: corosync
>  dc-version: 1.1.15-11.el7_3.4-e174ec8
>  default-action-timeout: 240
>  have-watchdog: false
>  no-quorum-policy: ignore
>  placement-strategy: balanced
>  stonith-enabled: false
>  symmetric-cluster: false
>
> Quorum:
>   Options:
>
>
> /usr/share/pacemaker/alert_file.sh does not get called whenever I
> trigger a scenario for failover.
> Please let me know if I m missing anything.

Do you get any logs - like for startup of resources - or nothing at all?

Regards,
Klaus

>
>
> Regards,
> Sriram.
>
> On Tue, Aug 8, 2017 at 8:29 PM, Ken Gaillot  > wrote:
>
> On Tue, 2017-08-08 at 17:40 +0530, Sriram wrote:
> > Hi Ulrich,
> >
> >
> > Please see inline.
> >
> > On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl
> >  > wrote:
> > >>> Sriram  > schrieb am 08.08.2017
>  um
> > 09:30 in Nachricht
> > 

Re: [ClusterLabs] Antw: Re: Notification agent and Notification recipients

2017-08-14 Thread Sriram
Hi Ken,

I used the alerts as well, seems to be not working.

Please check the below configuration
[root@node1 alerts]# pcs config show
Cluster Name:
Corosync Nodes:
Pacemaker Nodes:
 node1 node2 node3

Resources:
 Resource: TRR (class=ocf provider=heartbeat type=TimingRedundancyRA)
  Operations: start interval=0s timeout=60s (TRR-start-interval-0s)
  stop interval=0s timeout=20s (TRR-stop-interval-0s)
  monitor interval=10 timeout=20 (TRR-monitor-interval-10)

Stonith Devices:
Fencing Levels:

Location Constraints:
  Resource: TRR
Enabled on: node1 (score:100) (id:location-TRR-node1-100)
Enabled on: node2 (score:200) (id:location-TRR-node2-200)
Enabled on: node3 (score:300) (id:location-TRR-node3-300)
Ordering Constraints:
Colocation Constraints:
Ticket Constraints:

Alerts:
 Alert: alert_file (path=/usr/share/pacemaker/alert_file.sh)
  Options: debug_exec_order=false
  Meta options: timeout=15s
  Recipients:
   Recipient: recipient_alert_file_id
(value=/usr/share/pacemaker/alert_file.log)

Resources Defaults:
 resource-stickiness: INFINITY
Operations Defaults:
 No defaults set

Cluster Properties:
 cluster-infrastructure: corosync
 dc-version: 1.1.15-11.el7_3.4-e174ec8
 default-action-timeout: 240
 have-watchdog: false
 no-quorum-policy: ignore
 placement-strategy: balanced
 stonith-enabled: false
 symmetric-cluster: false

Quorum:
  Options:


/usr/share/pacemaker/alert_file.sh does not get called whenever I trigger a
scenario for failover.
Please let me know if I m missing anything.


Regards,
Sriram.

On Tue, Aug 8, 2017 at 8:29 PM, Ken Gaillot  wrote:

> On Tue, 2017-08-08 at 17:40 +0530, Sriram wrote:
> > Hi Ulrich,
> >
> >
> > Please see inline.
> >
> > On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl
> >  wrote:
> > >>> Sriram  schrieb am 08.08.2017 um
> > 09:30 in Nachricht
> > 

Re: [ClusterLabs] Antw: Re: Notification agent and Notification recipients

2017-08-08 Thread Ken Gaillot
On Tue, 2017-08-08 at 17:40 +0530, Sriram wrote:
> Hi Ulrich,
> 
> 
> Please see inline.
> 
> On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl
>  wrote:
> >>> Sriram  schrieb am 08.08.2017 um
> 09:30 in Nachricht
> 

Re: [ClusterLabs] Antw: Re: Notification agent and Notification recipients

2017-08-08 Thread Sriram
Hi Ulrich,

Please see inline.

On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl <
ulrich.wi...@rz.uni-regensburg.de> wrote:

> >>> Sriram  schrieb am 08.08.2017 um 09:30 in
> Nachricht
>