Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=eaf31c53c822f7... Commit: eaf31c53c822f73d31c4b4f2f586b27277ba9b10 Parent: be4ffa1bed23328a36b182b69c1c355abb7e16af Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Mon May 13 14:44:54 2013 +0200 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Mon May 13 14:46:40 2013 +0200
fencing: Fix regression on fence_drac5
Autodetect of EOL was not working properly if --ssh/-x was used.
Resolves: rhbz#904195 --- configure | 8 ++++---- fence/agents/Makefile | 6 +++--- fence/agents/drac/fence_drac5.py | 8 ++++++++ 3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/configure b/configure index 05fc58e..0bcbcc2 100755 --- a/configure +++ b/configure @@ -33,8 +33,8 @@ echo "configure gnbd" echo "configure rgmanager" (cd rgmanager; ./configure $@)
-echo "configure cmirror" -(cd cmirror; ./configure $@) +#echo "configure cmirror" +#(cd cmirror; ./configure $@)
-echo "configure cmirror-kernel" -(cd cmirror-kernel; ./configure $@) +#echo "configure cmirror-kernel" +#(cd cmirror-kernel; ./configure $@) diff --git a/fence/agents/Makefile b/fence/agents/Makefile index 669e291..e1d7eb4 100644 --- a/fence/agents/Makefile +++ b/fence/agents/Makefile @@ -33,7 +33,7 @@ all: ${MAKE} -C ipdu all ${MAKE} -C ipmilan all ${MAKE} -C lpar all - ${MAKE} -C manual all +# ${MAKE} -C manual all ${MAKE} -C mcdata all # ${MAKE} -C rackswitch all ${MAKE} -C rhevm all @@ -69,7 +69,7 @@ install: all ${MAKE} -C ipdu install ${MAKE} -C ipmilan install ${MAKE} -C lpar install - ${MAKE} -C manual install +# ${MAKE} -C manual install ${MAKE} -C mcdata install # ${MAKE} -C rackswitch install ${MAKE} -C rhevm install @@ -105,7 +105,7 @@ clean: ${MAKE} -C ipdu clean ${MAKE} -C ipmilan clean ${MAKE} -C lpar clean - ${MAKE} -C manual clean +# ${MAKE} -C manual clean ${MAKE} -C mcdata clean # ${MAKE} -C rackswitch clean ${MAKE} -C rhevm clean diff --git a/fence/agents/drac/fence_drac5.py b/fence/agents/drac/fence_drac5.py index 298339f..7cc099a 100755 --- a/fence/agents/drac/fence_drac5.py +++ b/fence/agents/drac/fence_drac5.py @@ -52,7 +52,15 @@ def set_power_status(conn, options): conn.send_eol("racadm serveraction " + action + " -m " + options["-m"]) elif options["model"] == "DRAC 5": conn.send_eol("racadm serveraction " + action) + + ## Fix issue with double-enter [CR/LF] + ## We need to read two additional command prompts (one from get + one from set command) conn.log_expect(options, options["-c"], int(options["-g"])) + if len(conn.before.strip()) == 0: + options["eol"] = options["eol"][:-1] + conn.log_expect(options, options["-c"], int(options["-g"])) + conn.log_expect(options, options["-c"], int(options["-g"])) + except pexpect.EOF: fail(EC_CONNECTION_LOST) except pexpect.TIMEOUT: