From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17425 invoked by alias); 1 Aug 2008 21:54:32 -0000 Received: (qmail 17419 invoked by alias); 1 Aug 2008 21:54:32 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: master - ip.sh: add sleeptime parameter To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 896edc8e681697995b402aef2a103d311be3f79f X-Git-Newrev: cae2ee8b73390bfa5cb25890800b5145cc277908 From: "Ryan O'Hara" Message-Id: <20080801215341.761F9A8256@lists.fedorahosted.org> Date: Fri, 01 Aug 2008 21:55:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00206.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cae2ee8b73390bfa5cb25890800b5145cc277908 Commit: cae2ee8b73390bfa5cb25890800b5145cc277908 Parent: 896edc8e681697995b402aef2a103d311be3f79f Author: Ryan O'Hara AuthorDate: Fri Aug 1 15:14:15 2008 -0500 Committer: Ryan O'Hara CommitterDate: Fri Aug 1 16:46:02 2008 -0500 ip.sh: add sleeptime parameter Allow user to specify amount of time to sleep after removing and IP address ('stop' command). The sleeptime parameter is specified in number of seconds. Default is 10 seconds. Setting sleeptime to zero will result in no sleep. --- rgmanager/src/resources/ip.sh | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh index e4c13d7..2e0ca03 100644 --- a/rgmanager/src/resources/ip.sh +++ b/rgmanager/src/resources/ip.sh @@ -90,6 +90,17 @@ meta_data() + + + Amount of time to sleep after removing an IP address. + Value is specified in seconds. Default value is 10. + + + Amount of time (seconds) to sleep. + + + + @@ -896,7 +907,13 @@ stop) # XXX Let nfsd/lockd clear their queues; we hope to have a # way to enforce this in the future - sleep 10 + if [ -z "$OCF_RESKEY_sleeptime" ]; then + sleep 10 + else + if [ "$OCF_RESKEY_sleeptime" -gt "0" ]; then + sleep $OCF_RESKEY_sleeptime + fi + fi else ocf_log debug "${OCF_RESKEY_address} is not configured" fi