[Pacemaker] Drbd primary never on SyncTarget
Dejan Muhamedagic
dejanmm at fastmail.fm
Tue Sep 8 11:35:40 UTC 2009
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.
> 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).
> I found the master-drbd0:x attributes:
>
> <transient_attributes id="00963868-845b-4dc4-927b-ef8b86ea38b8">
> <instance_attributes
> id="status-00963868-845b-4dc4-927b-ef8b86ea38b8">
> <nvpair
> id="status-00963868-845b-4dc4-927b-ef8b86ea38b8-probe_complete"
> name="probe_complete" value="true"/>
> <nvpair
> id="status-00963868-845b-4dc4-927b-ef8b86ea38b8-master-drbd0:1"
> name="master-drbd0:1" value="75"/>
> </instance_attributes>
> </transient_attributes>
>
> and
>
> <transient_attributes id="d8481b1a-97a3-4852-89de-ec9ab1828b15">
> <instance_attributes
> id="status-d8481b1a-97a3-4852-89de-ec9ab1828b15">
> <nvpair
> id="status-d8481b1a-97a3-4852-89de-ec9ab1828b15-probe_complete"
> name="probe_complete" value="true"/>
> <nvpair
> id="status-d8481b1a-97a3-4852-89de-ec9ab1828b15-master-drbd0:0"
> name="master-drbd0:0" value="75"/>
> </instance_attributes>
> </transient_attributes>
>
> I am assuming these are in the status part of the cib because they have
> a "reboot" lifetime.
They are always in the status section.
> The cluster still puts the drbd primary on the synctarget.
> I also cannot read the node attribute from the cib:
>
> # crm node attribute node1 show master-drbd0:1
> scope=nodes name=master-drbd0:1 value=(null)
> Error performing operation: The object/attribute does not exist
>
> (same if I try the other attribute)
Nodes can have static attributes as well.
You should try status-attr instead of attribute.
> Where am I going wrong?
>
> Thanks for reading this far,
>
> Johan
>
>
>
> drbd OCF RA patch:
>
> 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 when syncing and it
> would always end up with DRBD_CSTATE "Unconfigured" because of the case
> statement that follows (in the code).
OK. Florian: Can you please comment on this too.
Cheers,
Dejan
> Versions:
>
> Pacemaker 1.0.4-6dede86d6105786af3a5321ccf66b44b6914f0aa
> Heartbeat 2.99.2 (node: 7d5b329e13ca485b43826bfb80679ce6b9dc5324)
> DRBD: version: 8.3.0 (api:88/proto:86-89) GIT-hash:
> 9ba8b93e24d842f0dd3fb1f9b90e8348ddb95829
>
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
More information about the Pacemaker
mailing list