Gitweb: http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=... Commit: 6c1d000b5c368e35d1c917b552fc9a0c1cafe811 Parent: 4218481d0577d447245645a54abbf4e78ee90026 Author: Lon Hohberger lhh@redhat.com AuthorDate: Tue Jun 29 11:09:40 2010 -0400 Committer: Fabio M. Di Nitto fdinitto@redhat.com CommitterDate: Tue Jul 6 05:49:53 2010 +0200
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 3ce50f7..7153c7f 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)
cluster-commits@lists.fedorahosted.org