[ClusterLabs] pacemaker fencing
Ken Gaillot
kgaillot at redhat.com
Tue Sep 5 09:21:58 EDT 2017
On Tue, 2017-09-05 at 14:59 +0200, Klaus Wenninger wrote:
> On 09/05/2017 02:43 PM, Papastavros Vaggelis wrote:
>
> > Dear friends ,
> >
> >
> > I have two_nodes (sgw-01 and sgw-02) HA cluster integrated with two
> > APC PDUs as fence devices
> >
> > 1) pcs stonith create node2-psu fence_apc ipaddr="10.158.0.162"
> > login="apc" passwd="apc" port="1" pcmk_host_list="sgw-02"
> > pcmk_host_check="static-list" action="reboot" power_wait="5" op
> > monitor interval="60s"
> > pcs constraint location node2-psu prefers sgw-01=INFINITY
> >
> >
> > 2)pcs stonith create node1-psu fence_apc ipaddr="10.158.0.161"
> > login="apc" passwd="apc" port="1" pcmk_host_list="sgw-01"
> > pcmk_host_check="static-list" action="reboot" power_wait="5" op
> > monitor interval="60s"
Be aware that "action" is not the correct parameter to use here -- it
should never be specified in the resource configuration (newer versions
of pcs and pacemaker will give an error if you do). It's an internal
parameter that pacemaker sends to the agent.
What you're looking for is either the stonith-action cluster property
(which will apply to all fence devices in the cluster) or the
pcmk_reboot_action resource parameter.
> > pcs constraint location node1-psu prefers sgw-02=INFINITY
> >
> >
> >
> >
> > Fencing is working fine but i want to deploy the following
> > scenario :
> >
> >
> > If one node fenced more than x times during a specified time period
> > then change the fence action from reboot to stop.
> >
> >
> >
> > For example if the node rebooted more than 3 times during one hour
> > then at the next crash change the fence action from reboot to off.
> >
> >
> > Is there a proper way to implement the above scenario ?
> >
>
> I'm not aware of a direct support of this scenario.
>
> But what I could imagine is:
> Configure 2 fencing-resources for the same stonith-device on 2
> different levels.
> Before these on the same levels you could put a fence-agent (would
> have to do it yourself - maybe
> derive from fence_dummy in pacemaker package). In this agent you can
> do the counting and
> you would succeed making pacemaker proceed on the same level or fail
> to make pacemaker
> try the next level.
> Beware that with multiple agents on one level pacemaker always does
> on/off and no reboot.
> But for the higher level instance you can map the on-action to reboot
> and the off-action to metadata.
> While for the lower prio level you would just map the on-action to
> metadata (to make it do nothing).
>
> Regards,
> Klaus
> >
> >
> > is it mandatory to use two level fencing for the above case ?
> >
> >
> >
> >
> >
> >
> >
> > Sincerely
> >
> >
> > Vaggelis Papastavros
--
Ken Gaillot <kgaillot at redhat.com>
More information about the Users
mailing list