Skip to content

Commit

Permalink
High: RA: controld - wait for dlm_controld to be ready in start phase
Browse files Browse the repository at this point in the history
  • Loading branch information
haibinshi committed Feb 20, 2013
1 parent 694cdfe commit f30a4d4
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions extra/resources/controld
Expand Up @@ -129,8 +129,28 @@ controld_start() {

${OCF_RESKEY_daemon} $OCF_RESKEY_args

sleep 1
controld_monitor
while true
do
sleep 1

controld_monitor; rc=$?
case $rc in
$OCF_SUCCESS)
check_dir=/sys/kernel/config/dlm/cluster/comms
if grep 1 $check_dir/*/local >/dev/null 2>&1; then
return $OCF_SUCCESS
fi
;;
$OCF_NOT_RUNNING)
return $OCF_NOT_RUNNING
;;
*)
return $OCF_ERR_GENERIC
;;
esac

ocf_log debug "Waiting for ${OCF_RESKEY_daemon} to be ready"
done
}

controld_stop() {
Expand Down

0 comments on commit f30a4d4

Please sign in to comment.