-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds hard timeout for management initialization (#1333)
Issues: Fixes #541 Problem: The management root initialization may hang for longer than the specified timeout value Analysis: The requests library's underlying urllib3 code is doing retries when it fails to connect to a host or the connection is taking a long time. If you have a timeout set (for example 5), the default retries is 10 and therefore your timeout is actually 50 seconds. We can technically change this by providing a custom Retry() object to the `from requests.adapters import HTTPAdapter` adapter, but that would cause this retry to affect __all__ the API calls. We really only want to override the initial management root `_get_tmos_version` call. So we use the eventlet package to override this. If eventlet is not installed, the package will not be able to enforce this hard timeout and will pass on trying. By default, eventlet is installed with f5-sdk Tests: functional
- Loading branch information
1 parent
868360a
commit 037d244
Showing
7 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[bdist_rpm] | ||
release = 1 | ||
requires = f5-icontrol-rest >= 1.3.0 | ||
f5-icontrol-rest < 2 | ||
python-six >= 1.9 | ||
python-six < 2 | ||
requires = six>=1.9.0 | ||
six<2.0.0 | ||
f5-icontrol-rest>=1.3.0 | ||
f5-icontrol-rest<2.0.0 | ||
eventlet>=0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ six>=1.9.0 | |
six<2.0.0 | ||
f5-icontrol-rest>=1.3.0 | ||
f5-icontrol-rest<2.0.0 | ||
eventlet>=0.21.0 |