[Linux-HA] xml error in logs with external stonith plugin

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Jul 11 11:57:29 MDT 2007


On Wed, Jul 11, 2007 at 11:57:55AM -0400, Jordan Desroches wrote:
> Hi all :) I hope you can help me with this problem. I'm getting and  
> error sequence in the logs that indicates a problem with my dracmc  
> stonith plugin, but can't figure out why. I'm running 2.1.0 on Ubuntu  
> Feisty. Thanks for your help :)
> 
> Jordan
> 
> errors:
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error parsing  
> token: couldnt find attr_name
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error at or  
> before: ="password" unique="
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error parsing  
> token: error parsing child
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error at or  
> before:    <longdesc lang=en

Don't forget the quotes:

    <longdesc lang="en"

> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error parsing  
> token: error parsing child
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error at or  
> before: s> <parameter name="
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error parsing  
> token: error parsing child
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: parse_xml: Error at or  
> before: c> <parameters> <par
> Jul 11 11:44:42 drakh crmd: [7141]: ERROR: crm_abort: find_xml_node:  
> Triggered non-fatal assert at xml.c:75 : root != NULL
> Jul 11 11:44:42 drakh crmd: [7141]: WARN: find_xml_node: Could not  
> find actions in (null).
> 
> plugin:
> 
> 
> #!/bin/sh
> #
> # External STONITH module for the dell DRAC/MC.
> 
> 
> RACADM_COMMAND="/opt/dell/srvadmin/rac5/bin/racadm -r $address -u  
> $username -p $password serveraction -s"
> 
> REBOOT_COMMAND="powercycle"
> 
> POWEROFF_COMMAND="powerdown"
> 
> POWERON_COMMAND="powerup"
> 
> case $1 in
> gethosts)
>         #/opt/dell/srvadmin/rac5/bin/racadm -r $address -u $username  
> -p $password getmodinfo
>         echo "drakh"
>         echo "swamp"

You should have here

    echo "$hostname"

or perhaps "$hostlist". See below.

>         exit 0
>         ;;
> on)
>         $RACADM_COMMAND "$2" "$POWERON_COMMAND"
>         exit 0
>         ;;
> off)
>         $RACADM_COMMAND "$2" "$POWEROFF_COMMAND"
>         exit 0
>         ;;
> reset)
>         $RACADM_COMMAND "$2" "$REBOOT_COMMAND"
>         exit 0
>         ;;
> status)
>           if
>             ping -w1 -c1 "$address" 2>&1 | grep "unknown host"

Is there a better test using the racadm tool which would actually
verify that the device is operational?

>           then
>             exit 1
>           fi
>         exit 0
>         ;;
> getconfignames)
>         echo "username"
>         echo "password"
>         echo "address"

You need a "hostname" or "hostlist" parameter too. It will contain
the name (or names) of the node to be reset.

>         exit 0
>         ;;
> getinfo-devid)
>         echo "DRAC/MC STONITH device"
>         exit 0
>         ;;
> getinfo-devname)
>         echo "DRAC/MC STONITH external device"
>         exit 0
>         ;;
> getinfo-devdescr)
>         echo "Dell Remote Access Controller for Blades"
>         exit 0
>         ;;
> getinfo-devurl)
>         echo "http://dell.com"
>         exit 0
>         ;;
> getinfo-xml)
> cat << DRACXML
> <parameters>
> <parameter name="username" unique="1" required="1">
>   <content type="string"/>
>   <shortdesc lang="en">username</shortdesc>
>   <longdesc lang=en>
> dracmc Username
> </longdesc>
> </parameter>
> <parameter name="password" unique="1" required="1">
>   <content type="string"/>
>   <shortdesc lang="en">password</shortdesc>
>   <longdesc lang=en>
> dracmc Password
>   </longdesc>
> </parameter>
> <parameter name="address" unique="1" required="1">
>   <content type="string"/>
>   <shortdesc lang="en">address</shortdesc>
>   <longdesc lang=en>
> dracmc fqdn
>   </longdesc>
> </parameter>
> </parameters>
> DRACXML
>         exit 0
>         ;;
> *)
>         exit 1
>         ;;
> esac
> _______________________________________________
> 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

-- 
Dejan


More information about the Linux-HA mailing list