Re: [Pacemaker] Stonith setup hostname params

2011-03-28 Thread Dejan Muhamedagic
Hi,

On Tue, Mar 22, 2011 at 12:54:28PM +0300, Pavel Levshin wrote:
 22.03.2011 4:56, c...@itri.org.tw:
 
  I try to setup a simple STONITH-enabled 2-node Cluster, but failed.
 
  I read the document,
  http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf, and execute
  the following CLI command
 
  crm configure primitive rsa-fencing stonith:external/ibmrsa params
  hostname=alpha1 alpha2 ipaddr=192.168.75.178 userid=USR passwd=PWD
  type=ibm op monitor interval=60s
 
  The console print the ERROR message: “ERROR: rsa-fencing: parameter
  alpha2 does not exist”
 
 Currently, crm shell cannot handle quoted parameters with spaces from the 
 command line. Try to enter it interactively:

The crm shell gets what bash (or dash) passes. The quotes are
gobbled by bash in that process. Basically, what you type is not
what crm sees.

 #crm
 crm(live)# configure

This can also be done by crm configure. Other levels can also
be entered directly, e.g. crm resource or crm node.

 crm(live)configure# primitive rsa-fencing \
  stonith:external/ibmrsa params hostname=alpha1 alpha2 \
  ipaddr=192.168.75.178 userid=USR passwd=PWD type=ibm \
  op monitor interval=60s

Right. I really don't understand why's everybody trying to
configure the cluster directly from bash instead of doing it in
crm configure.

Thanks,

Dejan

 --
 Pavel Levshin
 

 ___
 Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
 http://oss.clusterlabs.org/mailman/listinfo/pacemaker
 
 Project Home: http://www.clusterlabs.org
 Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
 Bugs: 
 http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


Re: [Pacemaker] Stonith setup hostname params

2011-03-28 Thread Pavel Levshin

28.03.2011 18:35, Dejan Muhamedagic:

Currently, crm shell cannot handle quoted parameters with spaces from the 
command line. Try to enter it interactively:

The crm shell gets what bash (or dash) passes. The quotes are
gobbled by bash in that process. Basically, what you type is not
what crm sees.



I understand the mechanics. It is machine-centric and confusing to some 
users.


It is not absolutely impossible to accept quoted parameters from command 
line. Quotes are stripped, but these parameters are preserved in single 
arguments.



Right. I really don't understand why's everybody trying to
configure the cluster directly from bash instead of doing it in
crm configure.



CRM shell offers this opportunity, that's why many users try to use it. 
But, unfortunately, the feature is not uniform with interactive shell.



--
Pavel Levshin


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


Re: [Pacemaker] How to send email-notification on failure of resource in cluster frame work

2011-03-28 Thread Vadym Chepkov

On Mar 24, 2011, at 12:46 AM, Rakesh K wrote:

 Hi ALL
 Is there any way to send Email notifications when a resource is failure in the
 cluster frame work.
 
 while i was going through the Pacemaker-explained document provided in the
 website www.clusterlabs.org 
 
 There was no content in the chapter 7 -- which is sending email notification
 events.
 
 can anybody help me regarding this. 
 
 for know i am approaching the crm_mon --daemonize --as-html path ot fil to
 maintain the status of HA in html file.
 
 Is there any other approach for sending email notification.
 

Last time I checked, crm_mon is not well suited for this purpose.

crm_mon has the following option

   -T, --mail-to=value
  Send  Mail  alerts  to  this  user.See   also   --mail-from,
  --mail-host, --mail-prefix

But you will end-up with obscene amount of e-mails, I was blocked from gmail 
when I tried to use it once :)
For one resource failure you will get 4 e-mails: monitor,stop,start,monitor. 
Now imagine if it was a most significant member of a group or worse, node 
failure...

nagios would be better suited for this purpose, but, unfortunately, crm_mon is 
broken (http://developerbugs.linux-foundation.org/show_bug.cgi?id=2344) for 
quite awhile.

I am yet to find a good monitoring solution for pacemaker, hopefully somebody 
had more success and will share.

Thanks,
Vadym



___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


[Pacemaker] pacemaker and snmptt

2011-03-28 Thread Vadym Chepkov
Hi,

I have been trying to have snmptt (http://www.snmptt.org/) catch pacemaker's 
traps, but haven't been successful so far.

snmpttconvertmib utility doesn't process PCMK-MIB.txt, complains it doesn't 
have any TRAP-TYPE / NOTIFICATION-TYPE lines

I am catching unknown traps:

Mon Mar 28 21:06:14 2011: Unknown trap (.1.3.6.1.4.1.32723.1) received from 
xen-2 at: 
Value 0: xen-2
Value 1: 192.168.1.34
Value 2: 150:14:53:28.82
Value 3: .1.3.6.1.4.1.32723.1
Value 4: 192.168.1.34
Value 5: 
Value 6: 
Value 7: 
Value 8: 
Value 9: 
Value 10: 
Ent Value 0: .1.3.6.1.4.1.32723.1.2=apache_ldap
Ent Value 1: .1.3.6.1.4.1.32723.1.1=ce777942-c35b-48d6-8e60-b9a15378c031
Ent Value 2: .1.3.6.1.4.1.32723.1.3=monitor
Ent Value 3: .1.3.6.1.4.1.32723.1.4=not running
Ent Value 4: .1.3.6.1.4.1.32723.1.6=7
Ent Value 5: .1.3.6.1.4.1.32723.1.7=0
Ent Value 6: .1.3.6.1.4.1.32723.1.5=0


Mon Mar 28 21:06:16 2011: Unknown trap (.1.3.6.1.4.1.32723.1) received from 
xen-2 at: 
Value 0: xen-2
Value 1: 192.168.1.34
Value 2: 150:14:53:28.84
Value 3: .1.3.6.1.4.1.32723.1
Value 4: 192.168.1.34
Value 5: 
Value 6: 
Value 7: 
Value 8: 
Value 9: 
Value 10: 
Ent Value 0: .1.3.6.1.4.1.32723.1.2=apache_ldap
Ent Value 1: .1.3.6.1.4.1.32723.1.1=ce777942-c35b-48d6-8e60-b9a15378c031
Ent Value 2: .1.3.6.1.4.1.32723.1.3=stop
Ent Value 3: .1.3.6.1.4.1.32723.1.4=ok
Ent Value 4: .1.3.6.1.4.1.32723.1.6=0
Ent Value 5: .1.3.6.1.4.1.32723.1.7=0
Ent Value 6: .1.3.6.1.4.1.32723.1.5=0


If pacemaker would use different OIDs for different statuses, like switches do, 
for example:

EVENT coldStart .1.3.6.1.6.3.1.1.5.1 Status Events Normal
FORMAT Device reinitialized (coldStart)

EVENT warmStart .1.3.6.1.6.3.1.1.5.2 Status Events Normal
FORMAT Device reinitialized (warmStart)

EVENT linkDown .1.3.6.1.6.3.1.1.5.3 Status Events Normal
FORMAT Link down on interface $1.  Admin state: $2.  Operational state: $3 

EVENT linkUp .1.3.6.1.6.3.1.1.5.4 Status Events Normal
FORMAT Link up on interface $1.  Admin state: $2.  Operational state: $3

the it would be simple to write configuration file manually, but since it's the 
same for different statuses (not sure why this is the case), 
it's not so obvious. Did anybody have luck with integrating pacemaker and 
snmptt, by any chance? 

Thank you,
Vadym


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker