[Pacemaker] Migrate resources based on connectivity

Dan Frincu dfrincu at streamwide.ro
Sun Oct 10 19:27:13 UTC 2010


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

I've also tried ping instead of ping_clone with the same result, 
regardless of the node where ping is prohibited, the "all" group gets 
negative infinite metrics and "cannot run anywhere".

Also based on the "crm configure help location" output, I've tried:
- location ping_nok all \
    rule $id="ping_nok-rule" -inf: ping_clone number:lte 0 and #uname 
string:eq hostname

At this one, nothing happens to the group when ping is prohibited. So 
far, no luck. I'm using:

# rpm -qa | grep -i "(openais|cluster|heartbeat|pacemaker|resource)"
cluster-glue-1.0.6-1.6.el5
pacemaker-libs-1.0.9.1-1.el5
pacemaker-1.0.9.1-1.el5
heartbeat-libs-3.0.3-2.el5
heartbeat-3.0.3-2.el5
openaislib-1.1.3-1.6.el5
resource-agents-1.0.3-2.el5
cluster-glue-libs-1.0.6-1.6.el5
openais-1.1.3-1.6.el5

My goal is to move all the resources, drbd's and group from one node to 
the other if the gateway is unreachable via ping. I can say that the 
ocf:pacemaker:ping RA works (I've read some complaints about the pingd 
RA in the mailing lists), if this was just a group of resources, without 
the ordering and collocation constraints, it would have worked, however 
I need to specify these as well.

Any help would be appreciated, it's been a long weekend and I still 
haven't figured it out. I hope it's not a bug ...

Best regards,

Dan

-- 
Dan FRINCU
Systems Engineer
CCNA, RHCE
Streamwide Romania

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101010/6a3a489d/attachment-0001.html>


More information about the Pacemaker mailing list