[ClusterLabs] Location constraints for fencing resources?

Dan Swartzendruber dswartz at druber.com
Tue Sep 13 13:21:43 UTC 2016


On 2016-09-13 00:20, Klaus Wenninger wrote:
> Location-constraints for fencing-resources are definitely supported and
> don't just work by accident - if this was the question.
> 
> On 09/13/2016 02:43 AM, Dan Swartzendruber wrote:
>> On 2016-09-12 10:48, Dan Swartzendruber wrote:
>>> Posting this as a separate thread from my fence_apc one.  As I said 
>>> in
>>> that thread, I created two fence_apc agents, one to fence node A and
>>> one to fence node B.  Each was configured using a static pcmk node
>>> mapping, and constrained to only run on the other node.  In the
>>> process of testing this, I discovered a bug (feature?) in the LCMC 
>>> GUI
>>> I am using to manage the cluster.  To wit: when I click on a fence
>>> object, it never seems to fetch the resource constraints (e.g. they
>>> show in the GUI as "nothing selected"), so if I changes something 
>>> (say
>>> the power_wait timeout) and then click "Apply", the location
>>> constraints are deleted from that fencing resource.  I also noticed
>>> that if I connect to port 2224 (pcsd), regular resources show me the
>>> location constraints, whereas fence resources don't, which is making
>>> me wonder if this is not supported?  I'm thinking I can set up a
>>> pcmk_host_map to tell it which APC outlet manages node A and which
>>> manages node B, in which case I can just use one fence_apc resource
>>> with a dynamic pcmk host list?  Thanks!
>> 
>> Okay, this *seems* to work.  e.g. pcmk_host_list has the two hosts.
>> pmck_host_map says nas1:8;nas2:2.  The fencing agent was running on
>> nas2.  I logged in to nas2 and did 'systemctl stop network'.
>> pacemaker moved the fencing resource to nas1, then power-cycled nas2.
>> Looking good...

Basically, yes.  I was puzzled, since the web GUI pcsd serves up gives 
no apparent way to edit location constraints for stonith resources, and 
LCMC apparently doesn't read them from the config, so if you edit a 
stonith resource and change anything, then click on "Apply", it nukes 
any change you *had* made.  For the latter, I will open a ticket with 
the lcmc developer(s).  Thanks!




More information about the Users mailing list