Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#248] Unity: retry not work #251

Merged
merged 1 commit into from
Nov 26, 2018
Merged

[#248] Unity: retry not work #251

merged 1 commit into from
Nov 26, 2018

Conversation

Murray-LIANG
Copy link
Contributor

Fix #249 to issue #248 is too open. It changed
if resp.status_code == 401: to
if resp.status_code >= 400 and resp.status_code != 404:, which means
status code like 422 (hlu number conflict) raise HttpClientError and
the HttpClientError cannot be caught afterward and exceptions to
Cinder. Thus the retry mechanism doesn't take effect.

Another example is that deleting a volume twice. The second would return
409, and HttpClientError is raised directly to Cinder. The expected
behavior should be that ResourceNotFound is caught and ignored by
Unity driver.

Fix #249 to issue #248 is too open. It changed
`if resp.status_code == 401:` to
`if resp.status_code >= 400 and resp.status_code != 404:`, which means
status code like 422 (hlu number conflict) raise `HttpClientError` and
the `HttpClientError` cannot be caught afterward and exceptions to
Cinder. Thus the retry mechanism doesn't take effect.

Another example is that deleting a volume twice. The second would return
409, and `HttpClientError` is raised directly to Cinder. The expected
behavior should be that `ResourceNotFound` is caught and ignored by
Unity driver.
@Murray-LIANG Murray-LIANG merged commit e35c2ce into develop Nov 26, 2018
Murray-LIANG added a commit that referenced this pull request Nov 26, 2018
Fixed bugs:

- Unity: some server errors not handled correctly (#251)
Murray-LIANG added a commit that referenced this pull request Nov 26, 2018
Fixed bugs:

- Unity: some server errors not handled correctly (#251)
@yong-huang yong-huang deleted the unity-retry-not-work branch April 25, 2019 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants