[Pacemaker] How to run a set of resources on different nodes?
Tim Ward
Tim.Ward at ipaccess.com
Mon Feb 13 15:58:38 UTC 2012
If I've got a bunch of resources no two of which may run on the same
node I can do this by creating and maintaining lots of constraints of
the form
<rsc_colocation id="not-1-with-2" rsc="resource1" with-rsc="resource2"
score="-INFINITY"/>
<rsc_colocation id="not-17-with-14" rsc="resource17"
with-rsc="resource14" score="-INFINITY"/>
etc (for n resources that's O(n squared) constraints, but I only need
each one of the two possible ways round).
But that has scope for being somewhat tedious to code and a nightmare to
maintain (on deleting such a resource I'll have to write code which
tries to work out what constraints relating it to other resources might
exist and go round deleting them). Is there an easier and better way,
such as being able to say "no two instances of this primitive may run on
the same node"?
(I have found a thread from 2010 which seems to suggest that someone was
trying something along the lines of
colocation c -inf: ( A B C )
but I didn't understand the discussion, particularly in relation to what
the brackets mean and whether they are needed and where they go, or
whether the guy actually got it working in the end.)
Thanks
Tim Ward
Brett Ward Limited - www.brettward.co.uk
This message contains confidential information and may be privileged. If you are not the intended recipient, please notify the sender and delete the message immediately.
ip.access Ltd, registration number 3400157, Building 2020,
Cambourne Business Park, Cambourne, Cambridge CB23 6DW, United Kingdom
More information about the Pacemaker
mailing list