Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: b8235f4200def1297703b3da7721fb05821eb7d9
Parent: 9e5a1dafc93894612bc6436ac867c333b97c6181
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Jun 29 11:09:40 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed Jun 30 06:53:30 2010 -0400
Revert "resource-agents: Make vm.sh use stop/start timeouts"
This reverts commit c9bbf4f12402c5e38e51e21d38682712c18ab5ee.
---
rgmanager/src/resources/vm.sh | 65 +++-------------------------------------
1 files changed, 5 insertions(+), 60 deletions(-)
diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index dee7564..08fd097 100644
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -261,15 +261,15 @@ meta_data()
</parameters>
<actions>
- <action name="start" timeout="300"/>
+ <action name="start" timeout="20"/>
<action name="stop" timeout="120"/>
<action name="status" timeout="10"
interval="30"/>
<action name="monitor" timeout="10"
interval="30"/>
<!-- depth 10 calls the status_program -->
- <action name="status" depth="10" timeout="20"
interval="60"/>
- <action name="monitor" depth="10" timeout="20"
interval="60"/>
+ <action name="status" depth="10" timeout="10"
interval="300"/>
+ <action name="monitor" depth="10" timeout="10"
interval="300"/>
<!-- reconfigure - reconfigure with new OCF parameters.
NOT OCF COMPATIBLE AT ALL -->
@@ -351,31 +351,6 @@ do_xm_start()
}
-get_timeout()
-{
- declare -i default_timeout=60
- declare -i tout
-
- if [ -n "$OCF_RESKEY_RGMANAGER_meta_timeout" ]; then
- tout=$OCF_RESKEY_RGMANAGER_meta_timeout
- elif [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then
- tout=$OCF_RESKEY_CRM_meta_timeout
- fi
-
- if [ "$tout" -eq "0" ]; then
- echo $default_timeout
- return 0
- fi
- if [ $tout -lt 0 ]; then
- echo $default_timeout
- return 0
- fi
-
- echo $tout
- return 0
-}
-
-
#
# Start a virtual machine given the parameters from
# the environment.
@@ -453,7 +428,7 @@ do_xm_stop()
#
do_virsh_stop()
{
- declare -i timeout=$(get_timeout)
+ declare -i timeout=60
declare -i ret=1
declare state
@@ -468,7 +443,7 @@ do_virsh_stop()
echo virsh $op $OCF_RESKEY_name ...
virsh $op $OCF_RESKEY_name
- timeout=$(get_timeout)
+ timeout=60
while [ $timeout -gt 0 ]; do
sleep 5
((timeout -= 5))
@@ -938,30 +913,6 @@ migrate()
return $rv
}
-
-wait_start()
-{
- declare -i timeout_remaining=$(get_timeout)
-
- if [ -z "$OCF_RESKEY_status_program" ]; then
- return 0
- fi
-
- while [ $timeout_remaining -gt 0 ]; do
- bash -c "$OCF_RESKEY_status_program" &> /dev/null
- if [ $? -eq 0 ]; then
- return 0
- fi
- sleep 5
- ((timeout_remaining -= 5))
- done
-
- ocf_log err "Start of $OCF_RESOURCE_INSTANCE has failed"
- ocf_log err "Timeout exceeded while waiting for
\"$OCF_RESKEY_status_program\""
-
- return 1
-}
-
#
#
#
@@ -970,12 +921,6 @@ case $1 in
start)
validate_all || exit $OCF_ERR_ARGS
do_start
- rv=$?
- if [ $rv -ne 0 ]; then
- exit $rv
- fi
-
- wait_start
exit $?
;;
stop)