commit 1fe05064d950c24b6bb180170d314915c25331ec Author: Marek 'marx' Grac Date: Wed Aug 26 16:24:30 2015 +0200 fence_ilo: If gnutls can not open connection than --tls1.0 is tried in second attempt Resolves: rhbz#1256908 diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py index 047040b..d52b7a7 100644 --- a/fence/agents/ilo/fence_ilo.py +++ b/fence/agents/ilo/fence_ilo.py @@ -95,6 +95,23 @@ the iLO card through an XML stream." try: conn.send("\r\n") conn.log_expect(options, ["", ""], int(options["--login-timeout"])) + except pexpect.TIMEOUT: + fail(EC_LOGIN_DENIED) + except pexpect.EOF: + if "--tls1.0" in options: + fail(EC_LOGIN_DENIED) + options["--tls1.0"] = "1" + conn.close() + conn = fence_login(options) + try: + conn.send("\r\n") + conn.log_expect(options, ["", ""], int(options["--login-timeout"])) + except pexpect.TIMEOUT: + fail(EC_LOGIN_DENIED) + except pexpect.EOF: + fail(EC_LOGIN_DENIED) + + try: version = re.compile("