Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
It is not common, but HTTP requests can fail due to connection issues. In order to mitigate such situations and also improve logging, this PR enhances the Redfish request handling by adding an execution flow for re-trying HTTP requests; the retry happens only if the global settings
redfish.retriesis set to 1 or more retries; default is of 2 (two). One can disable the retries by settingredfish.retriesto 0 (zero).Types of changes
How Has This Been Tested?
Configured a test environment to ignore SSL while using HTTPS for Redfish requests. In such cases, IOExcetions will happen on a higher frequency than any other setup due to the exception
javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake.The following log shows GET requests that failed a couple of times, the successful request happened at the third attempt:
Note: Ignoring SSL is not ideal but the redfish out-of-band driver works fine in such case (we have been using it for a couple of months already). However, SSLHandshakeException (grandchild class of IOException) exceptions can be thrown. Nonetheless, ADMINS should have the freedom to still use Refish requests in such cases therefore it was and it has been working OK.