[Pacemaker] fence_legacy, stonith and apcmastersnmp

Andrew Beekhof andrew at beekhof.net
Tue Mar 20 21:42:57 UTC 2012


2012/3/5 Kadlecsik József <kadlecsik.jozsef at wigner.mta.hu>:
> On Mon, 5 Mar 2012, Andrew Beekhof wrote:
>
>> 2012/3/2 Kadlecsik József <kadlecsik.jozsef at wigner.mta.hu>:
>> > On Fri, 2 Mar 2012, Andrew Beekhof wrote:
>> >
>> >> 2012/3/2 Kadlecsik József <kadlecsik.jozsef at wigner.mta.hu>:
>> >> >
>> >> > After upgrading to pacemaker 1.1.6, cluster-glue 1.0.8 on Debian, our
>> >> > working apcmastersnmp resources stopped to work:
>> >> >
>> >> > Feb 29 14:22:03 atlas0 stonith: [35438]: ERROR: apcmastersnmp device not
>> >> > accessible.
>> >> > Feb 29 14:22:03 atlas0 stonith-ng: [32972]: notice: log_operation:
>> >> > Operation 'monitor' [35404] for device 'stonith-atlas6' returned: -2
>> >> > Feb 29 14:22:03 atlas0 stonith-ng: [32972]: ERROR: log_operation:
>> >> > stonith-atlas6: Performing: stonith -t apcmastersnmp -S 161
>> >> > Feb 29 14:22:03 atlas0 stonith-ng: [32972]: ERROR: log_operation:
>> >> > stonith-atlas6: Invalid config info for apcmastersnmp device
>> >> >
>> >> > Please note the strange "161" argument of stonith.
>> >> >
>> >> > After checking the source code and stracing stonithd, as far as I see, the
>> >> > following happens:
>> >> >
>> >> > - stonithd calls fence_legacy, which steals the "port=161" parameter from
>> >> >  apcmastersnmp. This produces the error message
>> >> >  "Invalid config info for apcmastersnmp device"
>> >>
>> >> You keep saying steals, what do you mean by that?  Where is it stolen from?
>> >
>> > fence_legacy passes the parameters to the stonith drivers via environment
>> > variables, except the "port".
>>
>> I had totally forgotten we do that.  Everything you've done makes
>> complete sense now.
>>
>> The second part is already pushed as:
>>    https://github.com/beekhof/pacemaker/commit/797d740
>>
>> I'll add the first part that adds the port as an environment variable now.
>
> The patches I suggested makes possible for the agents to start up, but
> fencing still doesn't work. Digging into it a little deeper, we found the
> following: the node to be fenced is passed to fence_legacy via stdin as
> "nodename=xxxx", however it's not coverted to $opt_n anywhere in the
> script. The following patch fixes the startup and fencing issues:
>
> --- fence_legacy.orig   2012-03-02 11:10:11.911369622 +0100
> +++ fence_legacy        2012-03-05 10:33:30.081345464 +0100
> @@ -102,7 +102,11 @@
>         {
>             $opt_o = $val;
>         }
> -       elsif ($name eq "port" )
> +        # elsif ($name eq "port" )
> +       # {
> +        #     $opt_n = $val;
> +        # }
> +        elsif ($name eq "nodename" )
>        {
>             $opt_n = $val;
>         }
> @@ -176,8 +180,8 @@
>    }
>    elsif ( $opt_o eq "monitor" || $opt_o eq "stat" || $opt_o eq "status" )
>    {
> -       print "Performing: $opt_s -t $opt_t -S $opt_n\n" unless defined $opt_q;
> -       exec "$opt_s -t $opt_t $extra_args -S $opt_n" or die "failed to exec \"$opt_s\"\n";
> +       print "Performing: $opt_s -t $opt_t -S\n" unless defined $opt_q;
> +       exec "$opt_s -t $opt_t $extra_args -S" or die "failed to exec \"$opt_s\"\n";
>    }
>    else
>    {
>
> With the modified fence_legacy ipmilan works again. However apcmastersnmp
> still doesn't work, the parameters
>
>        pcmk_host_list="nodename" pcmk_host_check="static-list"
>
> must be added to the original ones in order to make it work again.

host_check should be implied by host_list.
maybe i only fixed that after 1.1.6 went out though

>
> Best regards,
> Jozsef
> --
> E-mail : kadlecsik.jozsef at wigner.mta.hu
> PGP key: http://www.kfki.hu/~kadlec/pgp_public_key.txt
> Address: Wigner Research Centre for Physics, Hungarian Academy of Sciences
>         H-1525 Budapest 114, POB. 49, Hungary
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://bugs.clusterlabs.org
>




More information about the Pacemaker mailing list