Currently when a create call fails due to a
misconfiguration on the backend, or a problem
with satisfying the extra-specs from the filter
scheduler, the only thing you get in the logs is
a "No valid host".
This patch just adds a tiny bit more info to give us
a better idea where we're at.
First the exception shouldn't be setup with "reason=""",
so at least add "reason=no weighed hosts found".
Second, add a warning message prior to getting to that
point when we fail to find a host that satisfies the
{extra/qos}-specs that were requested, and include what
was being requested.
Change-Id: I2ce65b973196f673bac455613a6f8626320339ba
filter_properties)
if not weighed_host:
- raise exception.NoValidHost(reason="")
+ raise exception.NoValidHost(reason="No weighed hosts available")
host = weighed_host.obj.host
volume_id = request_spec['volume_id']
weighed_hosts = self._get_weighted_candidates(context, request_spec,
filter_properties)
if not weighed_hosts:
+ LOG.warning(_('No weighed hosts found for volume '
+ 'with properties: %s'),
+ filter_properties['request_spec']['volume_type'])
return None
return self._choose_top_host(weighed_hosts, request_spec)