Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

problem with stonith external/ibmrsa-telnet [+patch]

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


linux-ha at bzerk

Jun 27, 2008, 5:48 AM

Post #1 of 5 (233 views)
Permalink
problem with stonith external/ibmrsa-telnet [+patch]

Hello,

Working with heartbeat 2.1.3.
I've had some problems getting the external/ibmrsa-telnet stonith device to work.
In my logs I found the following:

Jun 27 10:42:58 log1 stonithd: [24079]: info: external_run_cmd: Calling '/usr/lib/stonith/plugins/external/ibmrsa-telnet reset log2' returned 256
Jun 27 10:42:58 log1 stonithd: [24079]: CRIT: external_reset_req: 'ibmrsa-telnet reset' for host log2 failed with rc 256

And after turning on debugging in the ibmrsa-telnet script:

2008-06-27 11:17:32,599: ibmrsa-telnet: ========== Start =============
2008-06-27 11:17:32,599: ibmrsa-telnet: STDOUT: ERROR: ibmrsa-telnet: Exactly one commandline argument required.
2008-06-27 11:17:32,599: ibmrsa-telnet: ERROR: ibmrsa-telnet: Exactly one commandline argument required.
2008-06-27 11:17:32,599: ibmrsa-telnet: STDOUT: Call me with one of the allowed commands: reset, gethosts, status, getconfignames, getinfo-devid, getinfo-devname, getinfo-devdescr, getinfo-devurl, getinfo-xml, on, off

Clearly, stonith is sending 2 arguments to the script; the reset command and the
nodename, where ibmrsa-telnet accepts only one argument.

I made a quick'n dirty patch to the script (see below) which works for me, but
now I wonder if anyone else is using this and if maybe there's a cleaner way to
do this.

regards,
Ruben

--- /usr/lib/stonith/plugins/external/ibmrsa-telnet.orig 2008-06-27 11:26:21.000000000 +0200
+++ /usr/lib/stonith/plugins/external/ibmrsa-telnet 2008-06-27 11:32:16.000000000 +0200
@@ -314,10 +314,13 @@

def process(self, argv):
self._echo_debug("========== Start =============")
- if len(argv) <> 1:
- self.echo_log("ERROR", 'Exactly one commandline argument required.')
+ if len(argv) < 1:
+ self.echo_log("ERROR", 'No commandline argument specified.')
self.echo(self.usage())
return(1)
+ if len(argv) > 1:
+ self.echo_log("WARN", 'Too many commandline arguments specified.')
+ self.echo(self.usage())
cmd = argv[0]
self._echo_debug("cmd:", cmd)
if cmd not in self._required_cmds_list and \


_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


dejanmm at fastmail

Jun 27, 2008, 6:09 AM

Post #2 of 5 (224 views)
Permalink
Re: problem with stonith external/ibmrsa-telnet [+patch] [In reply to]

Hi,

On Fri, Jun 27, 2008 at 02:48:30PM +0200, Ruben de Groot wrote:
>
> Hello,
>
> Working with heartbeat 2.1.3.
> I've had some problems getting the external/ibmrsa-telnet stonith device to work.
> In my logs I found the following:
>
> Jun 27 10:42:58 log1 stonithd: [24079]: info: external_run_cmd: Calling '/usr/lib/stonith/plugins/external/ibmrsa-telnet reset log2' returned 256
> Jun 27 10:42:58 log1 stonithd: [24079]: CRIT: external_reset_req: 'ibmrsa-telnet reset' for host log2 failed with rc 256
>
> And after turning on debugging in the ibmrsa-telnet script:
>
> 2008-06-27 11:17:32,599: ibmrsa-telnet: ========== Start =============
> 2008-06-27 11:17:32,599: ibmrsa-telnet: STDOUT: ERROR: ibmrsa-telnet: Exactly one commandline argument required.
> 2008-06-27 11:17:32,599: ibmrsa-telnet: ERROR: ibmrsa-telnet: Exactly one commandline argument required.
> 2008-06-27 11:17:32,599: ibmrsa-telnet: STDOUT: Call me with one of the allowed commands: reset, gethosts, status, getconfignames, getinfo-devid, getinfo-devname, getinfo-devdescr, getinfo-devurl, getinfo-xml, on, off
>
> Clearly, stonith is sending 2 arguments to the script; the reset command and the
> nodename, where ibmrsa-telnet accepts only one argument.

Hmm, can't recall this happening to people using ibmrsa-telnet.
Did you check the example CIB snippet which is at the end of the
ibmrsa-telnet script?

Thanks,

Dejan

>
> I made a quick'n dirty patch to the script (see below) which works for me, but
> now I wonder if anyone else is using this and if maybe there's a cleaner way to
> do this.
>
> regards,
> Ruben
>
> --- /usr/lib/stonith/plugins/external/ibmrsa-telnet.orig 2008-06-27 11:26:21.000000000 +0200
> +++ /usr/lib/stonith/plugins/external/ibmrsa-telnet 2008-06-27 11:32:16.000000000 +0200
> @@ -314,10 +314,13 @@
>
> def process(self, argv):
> self._echo_debug("========== Start =============")
> - if len(argv) <> 1:
> - self.echo_log("ERROR", 'Exactly one commandline argument required.')
> + if len(argv) < 1:
> + self.echo_log("ERROR", 'No commandline argument specified.')
> self.echo(self.usage())
> return(1)
> + if len(argv) > 1:
> + self.echo_log("WARN", 'Too many commandline arguments specified.')
> + self.echo(self.usage())
> cmd = argv[0]
> self._echo_debug("cmd:", cmd)
> if cmd not in self._required_cmds_list and \
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA[at]lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


linux-ha at bzerk

Jun 27, 2008, 6:30 AM

Post #3 of 5 (220 views)
Permalink
Re: problem with stonith external/ibmrsa-telnet [+patch] [In reply to]

On Fri, Jun 27, 2008 at 03:09:13PM +0200, Dejan Muhamedagic typed:
> On Fri, Jun 27, 2008 at 02:48:30PM +0200, Ruben de Groot wrote:
> >
> > 2008-06-27 11:17:32,599: ibmrsa-telnet: ========== Start =============
> > 2008-06-27 11:17:32,599: ibmrsa-telnet: STDOUT: ERROR: ibmrsa-telnet: Exactly one commandline argument required.
> > 2008-06-27 11:17:32,599: ibmrsa-telnet: ERROR: ibmrsa-telnet: Exactly one commandline argument required.
> > 2008-06-27 11:17:32,599: ibmrsa-telnet: STDOUT: Call me with one of the allowed commands: reset, gethosts, status, getconfignames, getinfo-devid, getinfo-devname, getinfo-devdescr, getinfo-devurl, getinfo-xml, on, off
> >
> > Clearly, stonith is sending 2 arguments to the script; the reset command and the
> > nodename, where ibmrsa-telnet accepts only one argument.
>
> Hmm, can't recall this happening to people using ibmrsa-telnet.
> Did you check the example CIB snippet which is at the end of the
> ibmrsa-telnet script?

Just compared it with the running cib.xml. Seems the only relevant
difference is the

<nvpair id="r_stonith-node01-type" name="type" value="ibm"/>

attribute. I'll check if this will make the original script work.

Thanks,
Ruben
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Andreas.Mock at web

Jun 27, 2008, 1:14 PM

Post #4 of 5 (215 views)
Permalink
Re: problem with stonith external/ibmrsa-telnet [+patch] [In reply to]

Hi all,

> -----Ursprüngliche Nachricht-----
> Von: "Dejan Muhamedagic" <dejanmm[at]fastmail.fm>
> Gesendet: 27.06.08 15:10:28
> An: General Linux-HA mailing list <linux-ha[at]lists.linux-ha.org>
> Betreff: Re: [Linux-HA] problem with stonith external/ibmrsa-telnet [+patch]


> > Clearly, stonith is sending 2 arguments to the script; the reset command and the
> > nodename, where ibmrsa-telnet accepts only one argument.

I'm happy that my script produces error messages that can be understood... ;-)

The very first version of that script had that error. I posted a corrected version
some days after that first version (now many months ago) , but it seems that the
wrong version got packed to the 2.1.3 package.
After realizing that I wrote a mail to Andrew who said that the corrected version
will be integrated in the next "official" realease.

So I really don't know which script is currently in the repositories as I don't know
where to look at.

The patch Ruben mad for hisself is more or less the same I mad for the second
version.

>
> Hmm, can't recall this happening to people using ibmrsa-telnet.
> Did you check the example CIB snippet which is at the end of the
> ibmrsa-telnet script?

There was definitely a bug in the first version of that script.
Sorry for the trouble.


Best regards
Andreas Mock

_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


dejanmm at fastmail

Jul 11, 2008, 5:38 AM

Post #5 of 5 (131 views)
Permalink
Re: problem with stonith external/ibmrsa-telnet [+patch] [In reply to]

Hi,

On Fri, Jun 27, 2008 at 10:14:56PM +0200, Andreas Mock wrote:
> Hi all,
>
> > -----Urspr?ngliche Nachricht-----
> > Von: "Dejan Muhamedagic" <dejanmm[at]fastmail.fm>
> > Gesendet: 27.06.08 15:10:28
> > An: General Linux-HA mailing list <linux-ha[at]lists.linux-ha.org>
> > Betreff: Re: [Linux-HA] problem with stonith external/ibmrsa-telnet [+patch]
>
>
> > > Clearly, stonith is sending 2 arguments to the script; the reset command and the
> > > nodename, where ibmrsa-telnet accepts only one argument.
>
> I'm happy that my script produces error messages that can be understood... ;-)
>
> The very first version of that script had that error. I posted a corrected version
> some days after that first version (now many months ago) , but it seems that the
> wrong version got packed to the 2.1.3 package.
> After realizing that I wrote a mail to Andrew who said that the corrected version
> will be integrated in the next "official" realease.
>
> So I really don't know which script is currently in the repositories as I don't know
> where to look at.

It's at hg.linux-ha.org/dev. AFAIK, the lattest version should be
there, i.e. the one which includes your patch.

Thanks,

Dejan
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.