commit 44912b5fefd94d3cbff1e308fecb0589e7928932
Author: Eric Fried <email address hidden>
Date: Thu Nov 30 11:39:11 2017 -0600
Proper error handling by _ensure_resource_provider
Previously, if _ensure_resource_provider encountered any error from the
placement REST API, it would (sometimes log a message and) return None.
Furthermore, a name conflict while creating the provider was treated the
same as a UUID conflict, which would actually result in None being
returned.
With this change set, the error paths that previously returned None now
raise one of the new ResourceProviderRetrievalFailed or
ResourceProviderCreationFailed exceptions; and the name conflict path is
detected and treated as an error condition.
Note: This change set only touches the SchedulerReportClient side of
these error conditions - it makes no attempt to add error handling to
its callers. Case in point, the API samples tests needed fixing because
they were previously running into the name conflict error condition, but
not noticing. As currently implemented, the new exceptions will
percolate up to ComputeManager.update_available_resource_for_node like
any others coming from SchedulerReportClient, where they will be logged
and ignored.
Closes-Bug: #1735430
(cherry picked from commit 112cd9cd1f31e091920e2f55fb213f78152dfd37)
Conflicts:
nova/scheduler/client/report.py
- Log translation removal
- ProviderTree integration
nova/tests/unit/scheduler/client/test_report.py
- ksa Adapter conversion
nova/tests/functional/test_list_servers_ip_filter.py
- Placement fixture needs to start before compute service
(cherry picked from commit 20531dbf89c77b6c63ad43285ccde20f176b6b23)
Conflicts:
No 2.53 microversion in Ocata:
doc/api_samples/os-hypervisors/v2.53/hypervisors-detail-resp.json
nova/tests/functional/api_sample_tests/api_samples/os-hypervisors/v2.53/hypervisors-detail-resp.json.tpl
nova/tests/functional/test_list_servers_ip_filter.py
nova/tests/functional/api_sample_tests/test_hypervisors.py
Return type changed, placement request ID not yet in logs:
nova/scheduler/client/report.py
nova/tests/unit/scheduler/client/test_report.py
Reviewed: https:/ /review. openstack. org/525309 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=44912b5fefd 94d3cbff1e308fe cb0589e7928932
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 44912b5fefd94d3 cbff1e308fecb05 89e7928932
Author: Eric Fried <email address hidden>
Date: Thu Nov 30 11:39:11 2017 -0600
Proper error handling by _ensure_ resource_ provider
Previously, if _ensure_ resource_ provider encountered any error from the
placement REST API, it would (sometimes log a message and) return None.
Furthermore, a name conflict while creating the provider was treated the
same as a UUID conflict, which would actually result in None being
returned.
With this change set, the error paths that previously returned None now rRetrievalFaile d or viderCreationFa iled exceptions; and the name conflict path is
raise one of the new ResourceProvide
ResourcePro
detected and treated as an error condition.
Note: This change set only touches the SchedulerReport Client side of update_ available_ resource_ for_node like Client, where they will be logged
these error conditions - it makes no attempt to add error handling to
its callers. Case in point, the API samples tests needed fixing because
they were previously running into the name conflict error condition, but
not noticing. As currently implemented, the new exceptions will
percolate up to ComputeManager.
any others coming from SchedulerReport
and ignored.
Closes-Bug: #1735430 1920e2f55fb213f 78152dfd37)
(cherry picked from commit 112cd9cd1f31e09
Conflicts: scheduler/ client/ report. py tests/unit/ scheduler/ client/ test_report. py tests/functiona l/test_ list_servers_ ip_filter. py
nova/
- Log translation removal
- ProviderTree integration
nova/
- ksa Adapter conversion
nova/
- Placement fixture needs to start before compute service
(cherry picked from commit 20531dbf89c77b6 c63ad43285ccde2 0f176b6b23)
Conflicts: api_samples/ os-hypervisors/ v2.53/hyperviso rs-detail- resp.json tests/functiona l/api_sample_ tests/api_ samples/ os-hypervisors/ v2.53/hyperviso rs-detail- resp.json. tpl tests/functiona l/test_ list_servers_ ip_filter. py tests/functiona l/api_sample_ tests/test_ hypervisors. py scheduler/ client/ report. py tests/unit/ scheduler/ client/ test_report. py
No 2.53 microversion in Ocata:
doc/
nova/
nova/
nova/
Return type changed, placement request ID not yet in logs:
nova/
nova/
Change-Id: I0c4ca6a81f2132 77fe7219cb905a8 05712f81e36