[Pacemaker] Drbd primary never on SyncTarget

Florian Haas florian.haas at linbit.com
Tue Sep 8 09:04:19 EDT 2009


On 2009-09-08 13:35, Dejan Muhamedagic wrote:
> Hi,
> 
> On Thu, Sep 03, 2009 at 02:15:49PM +0200, Jov wrote:
>> Hello,
>>
>>    I have been trying to keep my cluster from making the synctarget the
>> drbd primary, but I cannot get it to work. See the end of the email for
>> versions I use.
>>    I am using the heartbeat::drbd OCF RA. I had to patch it so it would
> 
> There is also the new drbd OCF RA by Linbit.
> 
> Florian: Can you please comment on the heartbeat OCF RA. Is it
> still useful under some circumstances or should it be marked as
> obsolete? In the latter case we could add a warning log message
> which would tell people to use the linbit drbd RA.

I would think that would be a good idea after DRBD 8.3.3 is released
(it's currently in -rc1), when the OCF RA is expected to emerge from
beta status and become fully supported. At that time, we can probably
even remove drbd from the agents repo, as the one thing that the new RA
does differently (floating peers) is horribly broken in the heartbeat RA
anyway. Everything else works exactly as previously, as far as the
configuration is concerned.

>> work with my drbd version (see below). As far as I can tell, the
>> attributes are correctly updated and the values adjusted when syncing
>> starts/ends. The values of the attribute seem to be 100 for the
>> SyncSource, 75 for normal operation and 10 for WFConnection and 5 for
>> anything else.
>>    I added the following location rules:
>>
>> location ms-drbd0-master-never-on-synctarget-0 ms-drbd0 \
>>         rule $id="ms-drbd0-primary-never-on-synctarget-0-rule" \
>> 	$role="Master" -inf: defined master-drbd0:0 and \
>> 	master-drbd0:0 lt 10
>> location ms-drbd0-master-never-on-synctarget-1 ms-drbd0 \
>>         rule $id="ms-drbd0-primary-never-on-synctarget-1-rule" \
>> 	$role="Master" -inf: defined master-drbd0:1 and \
>> 	master-drbd0:1 lt 10
> 
> There is some confusion on referencing master and clone
> instances. I'm not sure if that works with the current version of
> pacemaker (cf.
> http://developerbugs.linux-foundation.org/show_bug.cgi?id=2169).

It does not, except when you disable validation, which in turn wasn't
possible until Andrew fixed it post-1.0.5. This is definitely not
recommended for general purpose use; I understand Andrew is currently
exploring how to implement this better.

The question is moot in this case, though, as I already mentioned: all
of this is handled via master preferences which the ocf:linbit:drbd RA
updates automatically.

>> In function drbd_get_status I patched the line:
>>
>> DRBD_CSTATE=$(do_drbdadm cstate $RESOURCE)
>>
>> to
>>
>> DRBD_CSTATE=$(do_drbdadm cstate $RESOURCE | cut -d ' ' -f 1)
>>
>> because the cstate command returns extra output

Which extra output?

> when syncing and it
>> would always end up with DRBD_CSTATE "Unconfigured" because of the case
>> statement that follows (in the code).

Wrt to the case statement: that "normalization" of cstate/dstate/role is
utter nonsense. I'll assume there was a reason at on point (DRBD 0.7
probably), but that's long obsolete.

> OK. Florian: Can you please comment on this too.

Bottom line: even though the ocf:linbit:drbd RA is officially still in
beta, it's probably way superior to the ocf:heartbeat:drbd one.

Hope this helps,
Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20090908/fa5cd3cb/attachment-0003.sig>


More information about the Pacemaker mailing list