[Pacemaker] Pacemaker does not handler demote/promote atomically

Andrew Beekhof andrew at beekhof.net
Tue Mar 9 11:23:30 EST 2010


On Tue, Mar 9, 2010 at 4:52 PM, hj lee <kerdosa at gmail.com> wrote:
>
>
> On Tue, Mar 9, 2010 at 12:20 AM, Andrew Beekhof <andrew at beekhof.net> wrote:
>>
>> On Mon, Mar 8, 2010 at 9:37 PM, hj lee <kerdosa at gmail.com> wrote:
>> > Hi,
>> >
>> > In the typical multi-state resource agent, it changes master score on
>> > demote
>> > or promote. Each change in master score triggers PE calculation. Suppose
>> > the
>> > following scenario.
>> > 1. Pacemaker initiates demote/promote
>> > 2. demote is issued and lower the master score on the demoted node.
>> > 3. promote is issued and increases the master score on the promoted
>> > node.
>> >
>> > The PE calculation can be kicked off between 2 and 3, then the pacemaker
>> > will see two slaves in the moment. Depending on the master score it sees
>> > at
>> > the moment, the pacemaker may promote the old master.
>>
>> Is this a theoretical problem or one you've seen?
>> Because we'd only demote the old master if we wanted to promote a
>> different one.
>> And demoting the old master would make it even less likely to be
>> re-promoted than before.
>>
>> So I don't really see the issue.
>>
> I saw it in our servers. The master node is demoted and promoted again.

If you file a bug I'll take a look.

> This
> is a big problem in our cluster. Once the pacemaker scheduled
> demote/promote, it should complete the scheduled demote/promote.

You can never rely on that happening.
Even if I created the logic to attempt this, there could still be
failures (of the node or application kind) that would prevent it from
being carried out.

So if your RA requires the behavior, then your RA needs some fixing :-)

> If the
> pacemaker can not process this demote/promote in multistate clone, then
> there will be resources having a problem.
>
> Thanks
> hj
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
>




More information about the Pacemaker mailing list