Currently the VIM APIs including session creation API are retried for
cases which are unrelated to connection or session overload problems.
This change fix the retry logic as follows:
* Add an exception to indicate connection problem and raise it
appropriately from the VIM API client
* Modify the expected exceptions in the retry decorator to include
only connection and session overload related exceptions
This change also fixes the base class of VimFaultException
(VolumeBackendAPIException -> VimException). This change is required
so that we can handle the exceptions thrown by the VIM API client in
a consistent manner. Currently if we need to handle VIM API related
exceptions, we have to catch both VimException and VimFaultException.
For example, the API for checking active session raises
VimFaultException in some cases and we are handling only VimException.
Due to this, when session expires, the session re-establishment and API
retry fails (intermittently) since the check for active session throws
VimFaultException in some cases which is not handled.
Reviewed: https:/ /review. openstack. org/95651 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=3877a730c66 31f311baa3992be 6f37a986aa54f8
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 3877a730c6631f3 11baa3992be6f37 a986aa54f8
Author: Vipin Balachandran <email address hidden>
Date: Wed Apr 16 14:06:31 2014 +0530
vmware: Fix problems with VIM API retry logic
Currently the VIM APIs including session creation API are retried for
cases which are unrelated to connection or session overload problems.
This change fix the retry logic as follows:
* Add an exception to indicate connection problem and raise it
appropriately from the VIM API client
* Modify the expected exceptions in the retry decorator to include
only connection and session overload related exceptions
This change also fixes the base class of VimFaultException endAPIException -> VimException). This change is required eption in some cases and we are handling only VimException. eption in some cases which is not handled.
(VolumeBack
so that we can handle the exceptions thrown by the VIM API client in
a consistent manner. Currently if we need to handle VIM API related
exceptions, we have to catch both VimException and VimFaultException.
For example, the API for checking active session raises
VimFaultExc
Due to this, when session expires, the session re-establishment and API
retry fails (intermittently) since the check for active session throws
VimFaultExc
Change-Id: I72cfc7777c3ce6 93b8598633f822c 12c2cee2235 26ac17986a6e458 44b456e206)
Closes-Bug: #1294598
Closes-Bug: #1302514
(cherry picked from commit bc115eaa477d308