From 481a14f79e616aeef629f866f96b17825b440170 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Tue, 31 Mar 2015 09:31:06 -0400 Subject: [PATCH] Fix broken fetch_to_volume_format log message Format arguments are not passed correctly, leading to a "TypeError: not enough arguments for format string" failure. Fix the same issue introduced in hosts.py _list_hosts(). Closes-Bug: #1438607 Change-Id: Id2d4fe2eeb401361fac2ff24c3b04df7944aea9f --- cinder/api/contrib/hosts.py | 2 +- cinder/image/image_utils.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cinder/api/contrib/hosts.py b/cinder/api/contrib/hosts.py index 382e95729..d26868905 100644 --- a/cinder/api/contrib/hosts.py +++ b/cinder/api/contrib/hosts.py @@ -113,7 +113,7 @@ def _list_hosts(req, service=None): if host['disabled']: active = 'disabled' LOG.debug('status, active and update: %s, %s, %s', - (status, active, host['updated_at'])) + status, active, host['updated_at']) hosts.append({'host_name': host['host'], 'service': host['topic'], 'zone': host['availability_zone'], diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py index 6224da6c8..6e5e2fb19 100644 --- a/cinder/image/image_utils.py +++ b/cinder/image/image_utils.py @@ -312,8 +312,7 @@ def fetch_to_volume_format(context, image_service, # check via 'qemu-img info' that what we copied was in fact a raw # image and not a different format with a backing file, which may be # malicious. - LOG.debug("%s was %s, converting to %s ", (image_id, fmt, - volume_format)) + LOG.debug("%s was %s, converting to %s ", image_id, fmt, volume_format) convert_image(tmp, dest, volume_format, run_as_root=run_as_root) -- 2.45.2