Andrew Beekhof wrote:
On Wed, Mar 11, 2009 at 18:41, Jerome Yanga <[email protected]> wrote:
I have tried DRBD 8.3.0 but the DRBD OCF Agent of Pacemaker 1.0.2-11.1 does not
seem to work well with it.
technically speaking, the agent comes from heartbeat not pacemaker -
maybe there is an update...
Here are the changes I made to have drbd work with 8.3. The changes fall in two
classes: have the DRDB ocf script not die if drbd wasn't installed, and a one
line
fix to handle the drbdadm api change in 8.3.
The minimal essential change is to change do_drbdadm state -> do_drbdadm role.
Here are the full diffs:
*** heartbeat/drbd Thu Nov 20 09:56:29 2008
--- bunchball/drbd Wed Feb 18 19:29:37 2009
***************
*** 186,193 ****
}
drbd_init() {
- check_binary $DRBDADM
CRM_MASTER="${HA_SBIN_DIR}/crm_master -l reboot "
RESOURCE="$OCF_RESKEY_drbd_resource"
CLONE_NO="$OCF_RESKEY_CRM_meta_clone"
--- 186,194 ----
}
drbd_init() {
CRM_MASTER="${HA_SBIN_DIR}/crm_master -l reboot "
+
+ ocf_log debug "$RESOURCE: drbd_init, ACTION $ACTION"
RESOURCE="$OCF_RESKEY_drbd_resource"
CLONE_NO="$OCF_RESKEY_CRM_meta_clone"
***************
*** 198,207 ****
if [ '$ACTION' = 'monitor' ]; then
exit $OCF_NOT_RUNNING
else
! exit $OCF_ERR_INSTALLED
fi
fi
case "$OCF_RESKEY_clone_overrides_hostname" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
__DRBD_NODE__="node_${CLONE_NO}"
--- 199,211 ----
if [ '$ACTION' = 'monitor' ]; then
exit $OCF_NOT_RUNNING
else
! # exit $OCF_ERR_INSTALLED
! exit $OCF_NOT_RUNNING
fi
fi
+ # check_binary $DRBDADM
+
case "$OCF_RESKEY_clone_overrides_hostname" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
__DRBD_NODE__="node_${CLONE_NO}"
***************
*** 232,238 ****
drbd_get_status() {
! DRBD_STATE=$(do_drbdadm state $RESOURCE)
DRBD_STATE_LOCAL=$(echo $DRBD_STATE | sed -e 's#/.*##')
DRBD_STATE_REMOTE=$(echo $DRBD_STATE | sed -e 's#.*/##')
DRBD_CSTATE=$(do_drbdadm cstate $RESOURCE)
--- 236,242 ----
drbd_get_status() {
! DRBD_STATE=$(do_drbdadm role $RESOURCE)
DRBD_STATE_LOCAL=$(echo $DRBD_STATE | sed -e 's#/.*##')
DRBD_STATE_REMOTE=$(echo $DRBD_STATE | sed -e 's#.*/##')
DRBD_CSTATE=$(do_drbdadm cstate $RESOURCE)
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems