Clarify log message
The current message logged when showing image locations or direct_url is enabled makes it sound like there's a problem with the storage backend, whereas it's really just an explanation of why the locations or direct_url are empty/missing in the image response. This patch rewrites the message to say that explicitly. Change-Id: I9768fbba73aa290a7d159c01bd5ac0e9237f48ed Closes-bug: #1728689
This commit is contained in:
parent
14d209f2f4
commit
9e9743f571
|
@ -838,8 +838,8 @@ class ResponseSerializer(wsgi.JSONResponseSerializer):
|
|||
# image.locations is None to indicate it's allowed to show
|
||||
# locations but it's just non-existent.
|
||||
image_view['locations'] = []
|
||||
LOG.debug("There is not available location "
|
||||
"for image %s", image.image_id)
|
||||
LOG.debug("The 'locations' list of image %s is empty",
|
||||
image.image_id)
|
||||
|
||||
if CONF.show_image_direct_url:
|
||||
locations = _get_image_locations(image)
|
||||
|
@ -848,8 +848,9 @@ class ResponseSerializer(wsgi.JSONResponseSerializer):
|
|||
l = location_strategy.choose_best_location(locations)
|
||||
image_view['direct_url'] = l['url']
|
||||
else:
|
||||
LOG.debug("There is not available location "
|
||||
"for image %s", image.image_id)
|
||||
LOG.debug("The 'locations' list of image %s is empty, "
|
||||
"not including 'direct_url' in response",
|
||||
image.image_id)
|
||||
|
||||
image_view['tags'] = list(image.tags)
|
||||
image_view['self'] = self._get_image_href(image)
|
||||
|
|
Loading…
Reference in New Issue