public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL4 - fence_apc_snmp.py: fence_apc_snmp time wait
@ 2009-06-24 17:58 Marek Grác
  0 siblings, 0 replies; only message in thread
From: Marek Grác @ 2009-06-24 17:58 UTC (permalink / raw)
  To: cluster-cvs-relay

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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-24 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-24 17:58 cluster: RHEL4 - fence_apc_snmp.py: fence_apc_snmp time wait Marek Grác

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).