This gets rid of INFO level log events like
2020-03-09T13:37:20.980993-0500 mgr.x [WRN] Failed to apply mds.foo spec ServiceSpec({'placement': PlacementSpec(count:2), 'service_type': 'mds', 'service_id': 'foo'}): List of host candidates is empty
Signed-off-by: Sage Weil <sage@redhat.com>
def place(self, host_pool, count=None):
# type: (List, Optional[int]) -> List[HostPlacementSpec]
if not host_pool:
- raise Exception('List of host candidates is empty')
+ return []
host_pool = [x for x in host_pool]
# shuffle for pseudo random selection
random.shuffle(host_pool)