[Pacemaker] Migrate resources based on connectivity

Dan Frincu dfrincu at streamwide.ro
Tue Oct 12 14:00:10 EDT 2010


Hi,

Lars Ellenberg wrote:
> On Mon, Oct 11, 2010 at 03:50:01PM +0300, Dan Frincu wrote:
>   
>> Hi,
>>
>> Dejan Muhamedagic wrote:
>>     
>>> Hi,
>>>
>>> On Sun, Oct 10, 2010 at 10:27:13PM +0300, Dan Frincu wrote:
>>>       
>>>> Hi,
>>>>
>>>> I have the following setup:
>>>> - order drbd0:promote drbd1:promote
>>>> - order drbd1:promote drbd2:promote
>>>> - order drbd2:promote all:start
>>>> - collocation all drbd2:Master
>>>> - all is a group of resources, drbd{0..3} are drbd ms resources.
>>>>
>>>> I want to migrate the resources based on ping connectivity to a
>>>> default gateway. Based on http://www.clusterlabs.org/wiki/Pingd_with_resources_on_different_networks
>>>> and http://www.clusterlabs.org/wiki/Example_configurations I've
>>>> tried the following:
>>>> - primitive ping ocf:pacemaker:ping params host_list=1.2.3.4
>>>> multiplier=100 op monitor interval=5s timeout=5s
>>>> - clone ping_clone ping meta globally-unique=false
>>>> - location ping_nok all \
>>>>   rule $id="ping_nok-rule" -inf: not_defined ping_clone or
>>>> ping_clone number:lte 0
>>>>         
>>> Use pingd to reference the attribute in the location constraint.
>>>       
>> Not to be disrespectful, but after 3 days being stuck on this issue,
>> I don't exactly understand how to do that. Could you please provide
>> an example.
>>
>> Thank you in advance.
>>     
>
> The example you reference lists:
>
> 	primitive pingdnet1 ocf:pacemaker:pingd \
> 		params host_list=192.168.23.1 \
> 			name=pingdnet1
> 			^^^^^^^^^^^^^^
>
> 	clone cl-pingdnet1 pingdnet1
> 			   ^^^^^^^^^
>
> param name default is pingd,
> and is the attribute name to be used in the location constraints.
>
> You will need to reference pingd in you location constraint, or set an
> explicit name in the primitive definition, and reference that.
>
> Your ping primitive sets the default 'pingd' attribute,
> but you reference some 'ping_clone' attribute,
> which apparently no-one really references.
>
>   
I've finally managed to finish the setup with the indications received 
above, the behavior is the expected one. Also, I've tried the 
ocf:pacemaker:pingd and even though it does the reachability tests 
properly, it fails to update the cib upon restoring the connectivity, I 
had to manually run attrd_updater -R to get the resources to start 
again, therefore I'm going with ocf:pacemaker:ping.

Anyways, Dejan, Lars, Andrew, thank you all very much for your help.

Best regards,

Dan
<http://www.clusterlabs.org/wiki/Example_configurations>

-- 
Dan FRINCU
Systems Engineer
CCNA, RHCE
Streamwide Romania

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101012/38ead28d/attachment-0001.html>


More information about the Pacemaker mailing list