You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/09/28 10:52:42 UTC

[GitHub] [cloudstack] GabrielBrascher opened a new pull request #4352: Retry redfish requests

GabrielBrascher opened a new pull request #4352:
URL: https://github.com/apache/cloudstack/pull/4352


   ## Description
   <!--- Describe your changes in detail -->
   
   It is not common, but HTTP requests can fail due to connection issues, e.g. network or SSL droped request in case of th Redfish implementation that allows to ignore SSL.
   
   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.retries` is set to 1 or more retries; default is of 2 (two). One can disable the retries by setting `redfish.retries` to 0 (zero).
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   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`.
   
   Following is one of the requests on the staging environment that was possible only after a few retries.
   
   ```
   Failed to execute HTTP GET request [URL: https://oob-redfish.net/redfish/v1/Systems/]. Executing the request again.
   Retry HTTP GET request [URL: https://oob-redfish.net/redfish/v1/Systems/], attempt 1/2.
   Failed to execute HTTP GET request retry attempt 1/2 [URL: https://oob-redfish.net/redfish/v1/Systems/] due to exception javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
   Retry HTTP GET request [URL: https://oob-redfish.com/redfish/v1/Systems/], attempt 2/2.
   Successfully executed HTTP GET request [URL: https://oob-redfish.net/redfish/v1/Systems/].
   Retrieved System ID 'System.Embedded.1' with request 'GET: https://oob-redfish.com/redfish/v1/Systems/'
   Retrieved System power state 'On' with request 'GET: https://oob-redfish.com/redfish/v1/Systems/System.Embedded.1'
   ```
   
   **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.
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd merged pull request #4352: Retry redfish requests

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #4352:
URL: https://github.com/apache/cloudstack/pull/4352


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] GabrielBrascher commented on pull request #4352: Retry redfish requests

Posted by GitBox <gi...@apache.org>.
GabrielBrascher commented on pull request #4352:
URL: https://github.com/apache/cloudstack/pull/4352#issuecomment-699946799


   @blueoragutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #4352: Retry redfish requests

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4352:
URL: https://github.com/apache/cloudstack/pull/4352#issuecomment-701320904


   Merging based on Travis tests, changes are strictly in redfish oobm plugin that can't be tested with kvm/smoketest.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4352: Retry redfish requests

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4352:
URL: https://github.com/apache/cloudstack/pull/4352#issuecomment-699974282


   @GabrielBrascher a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4352: Retry redfish requests

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4352:
URL: https://github.com/apache/cloudstack/pull/4352#issuecomment-699989828


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2093


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] GabrielBrascher commented on pull request #4352: Retry redfish requests

Posted by GitBox <gi...@apache.org>.
GabrielBrascher commented on pull request #4352:
URL: https://github.com/apache/cloudstack/pull/4352#issuecomment-699973831


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org