[Linux-ha-dev] Stonith plugin for dell DRAC5

Dejan Muhamedagic dejanmm at fastmail.fm
Thu Oct 2 05:31:37 MDT 2008


Hi,

On Tue, Sep 30, 2008 at 08:37:52AM +0800, Xinwei Hu wrote:
> 2008/9/30 Dejan Muhamedagic <dejanmm at fastmail.fm>:
> > Hi Xinwei,
> >
> > On Sun, Sep 28, 2008 at 10:30:07PM +0800, Xinwei Hu wrote:
> >> Hi all,
> >>
> >>  Sorry that I forget to attach the patch for the previous mail.
> >>
> >>  The DRAC3 stonith plugin shipped with heartbeat seems not to work with DRAC5.
> >>
> >>  The attached patch is a simple external stonith plugin. It sshes
> >> into the specified IP address, then control the power of the host.
> >>
> >>  Please consider it for upstream.
> >
> > Great. Many people asked about the drac support.
> >
> >> +function chksshlogin() {
> >> +     test -x /usr/bin/sshlogin.exp
> >> +}
> >
> > I can't find this program.
> >
> >> +function sshlogin() {
> >> +     if [ x = "x$ipaddr" -o x = "x$userid" -o x = "x$passwd" ]
> >> +     then
> >> +             echo "ipaddr or userid missing; check configuration"
> >> +             return 1
> >> +     fi
> >> +
> >> +     test -f /etc/ha.d/drac.debug && set -x
> >> +     @SSH@ -q -x -n $userid@$ipaddr racadm serveraction "$1" >$outf 2>&1
> >> +     rc=$?
> >> +     #grep -w $failstg $outf
> >> +     #test $rc -eq 0 -a $? -eq 1
> >> +     test $rc -eq 0
> >
> > Last four lines have no effect.
> >
> > Has the plugin been tested?
> 
> The original plugin uses expect for ssh login, and has been tested in
> Dell's Lab.
> I just removed the usage of expect before submitting due to the
> apparent security issue.
> Sorry that I failed to clean up the code first.
> 
> Attached is a little more cleaned version. Please review ;)

Reviewed and committed a slightly modified version.

Cheers,

Dejan


More information about the Linux-HA-Dev mailing list