Handle None returned from get_allocation_candidates due to connect failure
The get_allocation_candidates method is decorated with the safe_connect
decorator that handles any failures trying to connect to the Placement
service. If keystoneauth raises an exception, safe_connect will log it
and return None. The select_destinations() method in the SchedulerManager
needs to handle the None case so it doesn't assume a tuple is coming back
which would result in a TypeError.
Reviewed: https:/ /review. openstack. org/484988 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=dcde535f957 e2eb4b8bfddd48d 6f19eef05ad4f9
Committed: https:/
Submitter: Jenkins
Branch: master
commit dcde535f957e2eb 4b8bfddd48d6f19 eef05ad4f9
Author: Matt Riedemann <email address hidden>
Date: Tue Jul 18 20:08:57 2017 -0400
Handle None returned from get_allocation_ candidates due to connect failure
The get_allocation_ candidates method is decorated with the safe_connect destinations( ) method in the SchedulerManager
decorator that handles any failures trying to connect to the Placement
service. If keystoneauth raises an exception, safe_connect will log it
and return None. The select_
needs to handle the None case so it doesn't assume a tuple is coming back
which would result in a TypeError.
Change-Id: Iffd72f51f25a9e 874eaacf374d807 94675236ac1
Closes-Bug: #1705141