[Pacemaker] colocation that doesn't
Tim Serong
tserong at novell.com
Tue Nov 30 03:16:48 UTC 2010
On 11/30/2010 at 10:11 AM, Alan Jones <falancluster at gmail.com> wrote:
> On Thu, Nov 25, 2010 at 6:32 AM, Tim Serong <tserong at novell.com> wrote:
> > Can you elaborate on why you want this particular behaviour? Maybe
> > there's some other way to approach the problem?
>
> I have explained the issue as clearly as I know how. The problem is
> fundamental
> to the design of the policy engine in Pacemaker. It performs only two
> passes to
> resolve constraints, when what is required for general purpose
> constraint resolution
> is an iterative model. These problems have been addressed in the literature
> for
> decades.
What I meant by "maybe there's some other way to approach the problem" is
"maybe there's some other way we can figure out how to get something *like*
the behaviour you desire, given the fact that Pacemaker's colocation
constraints behave the way they do".
If you have:
primitive resX ocf:pacemaker:Dummy
primitive resY ocf:pacemaker:Dummy
location resX-loc resX 1: nodeA.acme.com
location resY-loc resY 1: nodeB.acme.com
colocation resX-resY -2: resX resY
And you have "-inf constraints coming from an external source", as you
said before, can you change the external source so that it generates
different constraints?
e.g., instead of generating either of:
location resX-nodeA resX -inf: nodeA.acme.com
location resY-nodeB resY -inf: nodeB.acme.com
(where only the second one works, because of the dependency inherent
in the colocation contraint) can your external source specify these
constraints only in terms of resY, which is the one that's capable of
"dragging" resX around the place? e.g.:
location resX-nodeA resY inf: nodeA.acme.com
location resY-nodeB resY -inf: nodeB.acme.com
Or, if that sounds completely deranged, how about this:
On the assumption your "external source" will only ever inject one
-inf rule, for one resource, why not make it change the colocation
constraint as well? e.g.: generate either of:
location resX-nodeA resX -inf: nodeA.acme.com
colocation resY-resX -2: resY resX
(and delete resX-resY if present)
-- or --
location resY-nodeB resY -inf: nodeB.acme.com
colocation resX-resY -2: resX resY
(and delete resY-resX if present)
Are there any more details about your application you can share?
Regards,
Tim
--
Tim Serong <tserong at novell.com>
Senior Clustering Engineer, OPS Engineering, Novell Inc.
More information about the Pacemaker
mailing list