Mujtaba, Sayed Mohammed wrote:
> Hi,
>   I am able to fence it using external/ssh for my testing but need some
> clarification as I modified some part here... 
>   I observed from log file that heartbeat GUI invokes this script for
> fencing of other node (Stonith external ssh) 
> 
> /usr/lib64/stonith/plugins/external/ssh off p6pv2

You can configure a cluster option called "stonith-action" and I guess
yours is set to poweroff (or powerdown? can't remember). If you set it
to "reboot" (which is the default), nodes would be rebooted instead of
shutdown.

> But when I checked the script I found below code which is not doing any
> thing (for case on and off)
> 
> case $1 in
> gethosts)
>         for h in $hostlist ; do
>                 echo $h
>         done
>         exit 0
>         ;;
> on)
>         # Can't really be implemented because ssh cannot power on a
> system
>         # when it is powered off.
>         exit 1
>         ;;

Does this comment not make it clear enough? How would you "power on" a
node through ssh? Impossible.

> off)
>         # Shouldn't really be implemented because if ssh cannot power on
> a
>         # system, it shouldn't be allowed to power it off.
> 
>         rsh p6pv2 reboot
>         exit 1
>         ;;
> reset)
>         for h in $hostlist
> 
> off)
>         # Shouldn't really be implemented because if ssh cannot power on
> a
>         # system, it shouldn't be allowed to power it off.
>         exit 1

See above. If you power it off with the ssh "device", it will never be
able to start it again. So this is unimplemented. Makes sense to me.

>         ;;
>     
> 
>  For testing I enabled remote ssh on node which is to be fenced and put
> this code below in  case off
> 
>      off)
>         # Shouldn't really be implemented because if ssh cannot power on
> a
>         # system, it shouldn't be allowed to power it off.
> 
>         rsh p6pv2 reboot
>         exit 1
>         ;;
> 
> 
>   And I observed that it is able to reboot(fence) the other node
> successfully and testing is working as expected  ...

This will likely cause problems. Stonithd thinks it could not power off
the node (exit 1) but in fact, it restarted it.

>   Anyone having idea why this part of code is not doing any thing ?
> means is it some bug I found or any strong reason behind not fencing in
> that part ...
>    If it is bug can my corrected code can be taken as for bug fixing??

Rather not I think.

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

Reply via email to