Merge "Expand detected strings in check_cipher_suite_errors"
This commit is contained in:
commit
660c588dcb
@ -584,9 +584,11 @@ def check_cipher_suite_errors(cmd_stderr):
|
|||||||
:returns: True if the cmd_stderr contains a cipher suite error,
|
:returns: True if the cmd_stderr contains a cipher suite error,
|
||||||
False otherwise.
|
False otherwise.
|
||||||
"""
|
"""
|
||||||
cs_errors = ["Unsupported cipher suite ID",
|
cs_errors = [
|
||||||
"Error in open session response message :"
|
"Unsupported cipher suite ID",
|
||||||
" no matching cipher suite"]
|
"Error in open session response message : no matching cipher suite",
|
||||||
|
"Error in open session response message : invalid role",
|
||||||
|
]
|
||||||
for cs_err in cs_errors:
|
for cs_err in cs_errors:
|
||||||
if cmd_stderr is not None and cs_err in cmd_stderr:
|
if cmd_stderr is not None and cs_err in cmd_stderr:
|
||||||
return True
|
return True
|
||||||
|
@ -1721,12 +1721,19 @@ class IPMIToolPrivateMethodTestCase(
|
|||||||
'Problem\n\nError: Unable to establish IPMI v2 / RMCP+ session\n',
|
'Problem\n\nError: Unable to establish IPMI v2 / RMCP+ session\n',
|
||||||
'UnsupportedciphersuiteID:17\n\n'
|
'UnsupportedciphersuiteID:17\n\n'
|
||||||
]
|
]
|
||||||
|
invalid_role_error = 'Error in open session response message : ' \
|
||||||
|
'invalid role\n\nError: ' \
|
||||||
|
'Unable to establish IPMI v2 / RMCP+ session\n'
|
||||||
no_matching_error = 'Error in open session response message : ' \
|
no_matching_error = 'Error in open session response message : ' \
|
||||||
'no matching cipher suite\n\nError: ' \
|
'no matching cipher suite\n\nError: ' \
|
||||||
'Unable to establish IPMI v2 / RMCP+ session\n'
|
'Unable to establish IPMI v2 / RMCP+ session\n'
|
||||||
unsupported_error = 'Unsupported cipher suite ID : 17\n\n' \
|
unsupported_error = 'Unsupported cipher suite ID : 17\n\n' \
|
||||||
'Error: Unable to establish IPMI v2 / RMCP+ session\n'
|
'Error: Unable to establish IPMI v2 / RMCP+ session\n'
|
||||||
valid_errors_stderr = [no_matching_error, unsupported_error]
|
valid_errors_stderr = [
|
||||||
|
invalid_role_error,
|
||||||
|
no_matching_error,
|
||||||
|
unsupported_error,
|
||||||
|
]
|
||||||
for invalid_err in invalid_errors_stderr:
|
for invalid_err in invalid_errors_stderr:
|
||||||
self.assertFalse(ipmi.check_cipher_suite_errors(invalid_err))
|
self.assertFalse(ipmi.check_cipher_suite_errors(invalid_err))
|
||||||
for valid_err in valid_errors_stderr:
|
for valid_err in valid_errors_stderr:
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
The set of strings used to detect cipher suite version related errors
|
||||||
|
in the ``ipmitool`` command was expanded.
|
||||||
|
If the string ``Error in open session response message : invalid role``
|
||||||
|
is contained in the output of a failed ``ipmitool`` command execution,
|
||||||
|
such error will be now considered as related to inappropriate ciphers too,
|
||||||
|
and will be retried with another cipher suite version
|
||||||
|
if Ironic is configured to do so.
|
||||||
|
See `bug 2085137 <https://launchpad.net/bugs/2085137>`_ for more details.
|
Loading…
Reference in New Issue
Block a user