public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL54 - fence_agents: #501586 - fence agents fails with pexpect exception
@ 2009-06-08 12:06 Marek Grác
0 siblings, 0 replies; only message in thread
From: Marek Grác @ 2009-06-08 12:06 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5b8f284a873f1a7d0473b881af782ceaf76f1f6f
Commit: 5b8f284a873f1a7d0473b881af782ceaf76f1f6f
Parent: 8547ed2364594bf75290a4690960c3ce7959d6a6
Author: Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate: Mon Jun 8 13:51:21 2009 +0200
Committer: Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Mon Jun 8 14:03:29 2009 +0200
fence_agents: #501586 - fence agents fails with pexpect exception
try / except added to every fence agent where we try to exit using 'logout' functions.
This happends after fencing was succesfull so it should not be a problem if it fails.
---
fence/agents/bladecenter/fence_bladecenter.py | 9 +++++++--
fence/agents/drac/fence_drac5.py | 9 +++++++--
fence/agents/lpar/fence_lpar.py | 9 +++++++--
fence/agents/rsa/fence_rsa.py | 9 +++++++--
fence/agents/virsh/fence_virsh.py | 9 +++++++--
fence/agents/wti/fence_wti.py | 9 +++++++--
6 files changed, 42 insertions(+), 12 deletions(-)
diff --git a/fence/agents/bladecenter/fence_bladecenter.py b/fence/agents/bladecenter/fence_bladecenter.py
index 9fdfe97..3e7204a 100755
--- a/fence/agents/bladecenter/fence_bladecenter.py
+++ b/fence/agents/bladecenter/fence_bladecenter.py
@@ -86,8 +86,13 @@ def main():
##
## Logout from system
######
- conn.send("exit\r\n")
- conn.close()
+ try:
+ conn.send("exit\r\n")
+ conn.close()
+ except exceptions.OSError:
+ pass
+ except pexpect.ExceptionPexpect:
+ pass
if __name__ == "__main__":
main()
diff --git a/fence/agents/drac/fence_drac5.py b/fence/agents/drac/fence_drac5.py
index cf760b0..556ccb3 100755
--- a/fence/agents/drac/fence_drac5.py
+++ b/fence/agents/drac/fence_drac5.py
@@ -92,8 +92,13 @@ def main():
##
## Logout from system
######
- conn.sendline("exit")
- conn.close()
+ try:
+ conn.sendline("exit")
+ conn.close()
+ except exceptions.OSError:
+ pass
+ except pexpect.ExceptionPexpect:
+ pass
if __name__ == "__main__":
main()
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 2b669e3..91c3d6a 100755
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -122,8 +122,13 @@ def main():
##
## Logout from system
######
- conn.send("quit\r\n")
- conn.close()
+ try:
+ conn.send("quit\r\n")
+ conn.close()
+ except exceptions.OSError:
+ pass
+ except pexpect.ExceptionPexpect:
+ pass
if __name__ == "__main__":
main()
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 17b0fb9..e7f131c 100755
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -65,8 +65,13 @@ def main():
##
## Logout from system
######
- conn.sendline("exit")
- conn.close()
+ try:
+ conn.sendline("exit")
+ conn.close()
+ except exceptions.OSError:
+ pass
+ except pexpect.ExceptionPexpect:
+ pass
if __name__ == "__main__":
main()
diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py
index 11c3576..15885c6 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -80,8 +80,13 @@ def main():
fence_action(conn, options, set_power_status, get_power_status)
## Logout from system
- conn.sendline("quit")
- conn.close()
+ try:
+ conn.sendline("quit")
+ conn.close()
+ except exceptions.OSError:
+ pass
+ except pexpect.ExceptionPexpect:
+ pass
if __name__ == "__main__":
main()
diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py
index 0016a90..5740cd4 100755
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -110,8 +110,13 @@ def main():
##
## Logout from system
######
- conn.send("/X"+"\r\n")
- conn.close()
+ try:
+ conn.send("/X"+"\r\n")
+ conn.close()
+ except exceptions.OSError:
+ pass
+ except pexpect.ExceptionPexpect:
+ pass
if __name__ == "__main__":
main()
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-08 12:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-08 12:06 cluster: RHEL54 - fence_agents: #501586 - fence agents fails with pexpect exception 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).