nova/doc/api_samples/os-hypervisors
Eric Fried 20531dbf89 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 112cd9cd1f)

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

Change-Id: I0c4ca6a81f213277fe7219cb905a805712f81e36
2017-12-01 15:36:40 -06:00
..
v2.28 Microversion 2.28 changes cpu_info string to JSON object 2016-06-01 16:25:17 +00:00
v2.33 Proper error handling by _ensure_resource_provider 2017-12-01 15:36:40 -06:00
v2.53 Proper error handling by _ensure_resource_provider 2017-12-01 15:36:40 -06:00
hypervisors-detail-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00
hypervisors-list-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00
hypervisors-search-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00
hypervisors-show-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00
hypervisors-statistics-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00
hypervisors-uptime-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00
hypervisors-with-servers-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00
hypervisors-without-servers-resp.json Move the v2 api_sample functional tests 2015-08-18 15:25:41 +08:00