[Pacemaker] Unexpected master/slave behavior

David Mohr damailings at mcbf.net
Mon Aug 9 09:41:02 EDT 2010


On Mon, 9 Aug 2010 14:37:23 +0200, Dejan Muhamedagic <dejanmm at fastmail.fm>
wrote:
> Hi,
> 
> On Mon, Aug 09, 2010 at 01:34:16PM +0200, David Mohr wrote:
...
>> * 2 nodes,
>> * drbd in a primary/secondary setup,
>> * an IP address that's supposed to be up on the drbd master.
...
>> First we tried to move the master_ip directly. The docs say that due to
>> the colocation drbd0:master should take master_ip's preference into
>> account, and thus switch s1a to be the primary node before moving
>> master_ip.
>> 
>> # crm resource migrate master_ip s1b
>> # crm configure show | grep 'cli-'
>> location cli-prefer-master_ip master_ip \
>>         rule $id="cli-prefer-rule-master_ip" inf: #uname eq s1b
> 
> There's a shorter syntax to specify node preference:
> 
> location cli-prefer-master_ip master_ip inf: s1b

Thanks, we were wondering if it really was the same.
 
>> Unfortunately this rule had no visible effect, s1a remains as the drbd
>> primary and runs master_ip.
>> 
>> 
>> The second try was to add a rule that forces s1a to become the primary:
>> # crm configure \
>>     location master_on_s1b ms_drbd0 \
>>         rule $id="test-rule" $role="Master" inf: #uname eq s1b
>> 
>> However again nothing happens at all. Both the drbd primary and
master_ip
>> stay on s1a.
> 
> That's strange. This is sort of basic functionality and should
> work. Normally, you should use lower scores, such as 100.

We tried it with lower scores as well, which had the same strange results.

>> When working with -inf everything is working as expected, e.g. 
>> # crm resource migrate master_ip
>> will move the resource to s1b.
>> 
>> But instead we want to work with positive scores, since it allows more
>> fine-grained control. As far as our understanding _both_ of the above
>> rules
>> should move master_ip to s1b.
> 
> Right.
> 
>> What are we doing wrong? We tried to look
> 
> Apparently nothing wrong with either of the location constraints
> shown above.
> 
> Hard to say what's going on without looking at the logs. Please
> send a hb_report from the time you specify a location constraint.
> If the file's too big, please post it somewhere or open a
> bugzilla.

I opened bug 2464[1] for this issue.

> Thanks,
> 
> Dejan

Thank you for the quick reply!

~David

[1]: http://developerbugs.linux-foundation.org/show_bug.cgi?id=2464




More information about the Pacemaker mailing list