public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Marek Grác" <marx@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: RHEL4 - fence_apc_snmp.py: fence_apc_snmp time wait
Date: Wed, 24 Jun 2009 17:58:00 -0000	[thread overview]
Message-ID: <20090624175732.E12C7120263@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e92d478d1d309c329e628997f746e7cda65fd1e6
Commit:        e92d478d1d309c329e628997f746e7cda65fd1e6
Parent:        4ca1c6629655cd0b468fbc0e63b1f80729001f28
Author:        Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate:    Wed Jun 24 19:51:59 2009 +0200
Committer:     Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Wed Jun 24 19:51:59 2009 +0200

fence_apc_snmp.py: fence_apc_snmp time wait

Patch from Alexandros Soumplis adds time before check for change of power state
is validated. It is similar to POWER_TIMEOUT used in fencing library.

bz #494587
---
 fence/agents/apc_snmp/fence_apc_snmp.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
index ec9353a..9069461 100755
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -23,6 +23,7 @@
 import getopt, sys
 import os
 import datetime
+import time
 import select
 import signal
 from glob import glob
@@ -382,17 +383,21 @@ def main2():
 					  agent.status()))
   elif params['option'] == 'on':
 	  agent.power_on()
+	  time.sleep(5)
 	  if agent.status() != 'on':
 		  raise Exception, 'Error turning outlet on'
   elif params['option'] == 'off':
 	  agent.power_off()
+	  time.sleep(5)
 	  if agent.status() != 'off':
 		  raise Exception, 'Error turning outlet off'
   elif params['option'] == 'reboot':
 	  agent.power_off()
+	  time.sleep(5)
 	  if agent.status() != 'off':
 		  raise Exception, 'Error turning outlet off'
 	  agent.power_on()
+	  time.sleep(5)
 	  if agent.status() != 'on':
 		  raise Exception, 'Error turning outlet on'
   else:


                 reply	other threads:[~2009-06-24 17:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090624175732.E12C7120263@lists.fedorahosted.org \
    --to=marx@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).