From 9e9743f5713948c9530aed603e7cc52b85c3b879 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Mon, 30 Oct 2017 16:11:46 -0400 Subject: [PATCH] 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 --- glance/api/v2/images.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/glance/api/v2/images.py b/glance/api/v2/images.py index d464c7998c..741f0f450d 100644 --- a/glance/api/v2/images.py +++ b/glance/api/v2/images.py @@ -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)