Merge "Remove extra bracket in LOG message"
This commit is contained in:
commit
6a6199500e
@ -156,8 +156,8 @@ class ContainersController(base.Controller):
|
|||||||
try:
|
try:
|
||||||
containers[i] = compute_api.container_show(context, c)
|
containers[i] = compute_api.container_show(context, c)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception(("Error while list container %(uuid)s: "
|
LOG.exception("Error while list container %(uuid)s: "
|
||||||
"%(e)s."),
|
"%(e)s.",
|
||||||
{'uuid': c.uuid, 'e': e})
|
{'uuid': c.uuid, 'e': e})
|
||||||
containers[i].status = consts.UNKNOWN
|
containers[i].status = consts.UNKNOWN
|
||||||
|
|
||||||
|
@ -94,15 +94,15 @@ class NovaClient(object):
|
|||||||
try:
|
try:
|
||||||
server = self.client().servers.get(server_id)
|
server = self.client().servers.get(server_id)
|
||||||
except exceptions.OverLimit as exc:
|
except exceptions.OverLimit as exc:
|
||||||
LOG.warning(("Received an OverLimit response when "
|
LOG.warning("Received an OverLimit response when "
|
||||||
"fetching server (%(id)s) : %(exception)s"),
|
"fetching server (%(id)s) : %(exception)s",
|
||||||
{'id': server_id,
|
{'id': server_id,
|
||||||
'exception': exc})
|
'exception': exc})
|
||||||
except exceptions.ClientException as exc:
|
except exceptions.ClientException as exc:
|
||||||
if ((getattr(exc, 'http_status', getattr(exc, 'code', None)) in
|
if ((getattr(exc, 'http_status', getattr(exc, 'code', None)) in
|
||||||
(500, 503))):
|
(500, 503))):
|
||||||
LOG.warning(("Received the following exception when "
|
LOG.warning("Received the following exception when "
|
||||||
"fetching server (%(id)s) : %(exception)s"),
|
"fetching server (%(id)s) : %(exception)s",
|
||||||
{'id': server_id,
|
{'id': server_id,
|
||||||
'exception': exc})
|
'exception': exc})
|
||||||
else:
|
else:
|
||||||
@ -117,17 +117,17 @@ class NovaClient(object):
|
|||||||
try:
|
try:
|
||||||
server.get()
|
server.get()
|
||||||
except exceptions.OverLimit as exc:
|
except exceptions.OverLimit as exc:
|
||||||
LOG.warning(("Server %(name)s (%(id)s) received an OverLimit "
|
LOG.warning("Server %(name)s (%(id)s) received an OverLimit "
|
||||||
"response during server.get(): %(exception)s"),
|
"response during server.get(): %(exception)s",
|
||||||
{'name': server.name,
|
{'name': server.name,
|
||||||
'id': server.id,
|
'id': server.id,
|
||||||
'exception': exc})
|
'exception': exc})
|
||||||
except exceptions.ClientException as exc:
|
except exceptions.ClientException as exc:
|
||||||
if ((getattr(exc, 'http_status', getattr(exc, 'code', None)) in
|
if ((getattr(exc, 'http_status', getattr(exc, 'code', None)) in
|
||||||
(500, 503))):
|
(500, 503))):
|
||||||
LOG.warning(('Server "%(name)s" (%(id)s) received the '
|
LOG.warning('Server "%(name)s" (%(id)s) received the '
|
||||||
'following exception during server.get(): '
|
'following exception during server.get(): '
|
||||||
'%(exception)s'),
|
'%(exception)s',
|
||||||
{'name': server.name,
|
{'name': server.name,
|
||||||
'id': server.id,
|
'id': server.id,
|
||||||
'exception': exc})
|
'exception': exc})
|
||||||
|
@ -86,10 +86,9 @@ def safe_rstrip(value, chars=None):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
if not isinstance(value, six.string_types):
|
if not isinstance(value, six.string_types):
|
||||||
LOG.warning((
|
LOG.warning(
|
||||||
"Failed to remove trailing character. Returning original object. "
|
"Failed to remove trailing character. Returning original object. "
|
||||||
"Supplied object is not a string: %s."
|
"Supplied object is not a string: %s.", value)
|
||||||
), value)
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
return value.rstrip(chars) or value
|
return value.rstrip(chars) or value
|
||||||
|
@ -244,8 +244,8 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
self.driver.delete(context, container, force)
|
self.driver.delete(context, container, force)
|
||||||
except exception.DockerError as e:
|
except exception.DockerError as e:
|
||||||
with excutils.save_and_reraise_exception(reraise=reraise):
|
with excutils.save_and_reraise_exception(reraise=reraise):
|
||||||
LOG.error(("Error occurred while calling Docker "
|
LOG.error("Error occurred while calling Docker "
|
||||||
"delete API: %s"), six.text_type(e))
|
"delete API: %s", six.text_type(e))
|
||||||
self._fail_container(context, container, six.text_type(e))
|
self._fail_container(context, container, six.text_type(e))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
with excutils.save_and_reraise_exception(reraise=reraise):
|
with excutils.save_and_reraise_exception(reraise=reraise):
|
||||||
@ -328,8 +328,8 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
return container
|
return container
|
||||||
except exception.DockerError as e:
|
except exception.DockerError as e:
|
||||||
with excutils.save_and_reraise_exception(reraise=reraise):
|
with excutils.save_and_reraise_exception(reraise=reraise):
|
||||||
LOG.error(("Error occurred while calling Docker reboot "
|
LOG.error("Error occurred while calling Docker reboot "
|
||||||
"API: %s"), six.text_type(e))
|
"API: %s", six.text_type(e))
|
||||||
self._fail_container(context, container, six.text_type(e))
|
self._fail_container(context, container, six.text_type(e))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
with excutils.save_and_reraise_exception(reraise=reraise):
|
with excutils.save_and_reraise_exception(reraise=reraise):
|
||||||
@ -499,8 +499,8 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
container.save(context)
|
container.save(context)
|
||||||
return access_url
|
return access_url
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.error(("Error occurred while calling "
|
LOG.error("Error occurred while calling "
|
||||||
"get websocket url function: %s"),
|
"get websocket url function: %s",
|
||||||
six.text_type(e))
|
six.text_type(e))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
@ -511,8 +511,8 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
container = self.driver.resize(context, container, height, width)
|
container = self.driver.resize(context, container, height, width)
|
||||||
return container
|
return container
|
||||||
except exception.DockerError as e:
|
except exception.DockerError as e:
|
||||||
LOG.error(("Error occurred while calling docker "
|
LOG.error("Error occurred while calling docker "
|
||||||
"resize API: %s"),
|
"resize API: %s",
|
||||||
six.text_type(e))
|
six.text_type(e))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ def load_container_driver(container_driver=None):
|
|||||||
if not container_driver:
|
if not container_driver:
|
||||||
container_driver = CONF.container_driver
|
container_driver = CONF.container_driver
|
||||||
if not container_driver:
|
if not container_driver:
|
||||||
LOG.error(("Container driver option required, "
|
LOG.error("Container driver option required, "
|
||||||
"but not specified"))
|
"but not specified")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
LOG.info("Loading container driver '%s'", container_driver)
|
LOG.info("Loading container driver '%s'", container_driver)
|
||||||
|
@ -42,8 +42,8 @@ class LinuxHost(host_capability.Host):
|
|||||||
output = processutils.execute('lscpu', '-p=socket,cpu')
|
output = processutils.execute('lscpu', '-p=socket,cpu')
|
||||||
old_lscpu = True
|
old_lscpu = True
|
||||||
except processutils.ProcessExecutionError as e:
|
except processutils.ProcessExecutionError as e:
|
||||||
LOG.exception(("There was a problem while executing lscpu "
|
LOG.exception("There was a problem while executing lscpu "
|
||||||
"-p=socket,cpu : %s"), six.text_type(e))
|
"-p=socket,cpu : %s", six.text_type(e))
|
||||||
raise exception.CommandError(cmd="lscpu")
|
raise exception.CommandError(cmd="lscpu")
|
||||||
if old_lscpu:
|
if old_lscpu:
|
||||||
cpu_sock_pair = re.findall("\d+(?:,\d+)?", str(output))
|
cpu_sock_pair = re.findall("\d+(?:,\d+)?", str(output))
|
||||||
|
@ -37,8 +37,8 @@ def load_image_driver(image_driver=None):
|
|||||||
:returns: a ContainerImageDriver instance
|
:returns: a ContainerImageDriver instance
|
||||||
"""
|
"""
|
||||||
if not image_driver:
|
if not image_driver:
|
||||||
LOG.error(("Container image driver option required, "
|
LOG.error("Container image driver option required, "
|
||||||
"but not specified"))
|
"but not specified")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
LOG.info("Loading container image driver '%s'", image_driver)
|
LOG.info("Loading container image driver '%s'", image_driver)
|
||||||
@ -76,8 +76,8 @@ def pull_image(context, repo, tag, image_pull_policy='always',
|
|||||||
except exception.ImageNotFound:
|
except exception.ImageNotFound:
|
||||||
image = None
|
image = None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception(('Unknown exception occurred while loading '
|
LOG.exception('Unknown exception occurred while loading '
|
||||||
'image: %s'), six.text_type(e))
|
'image: %s', six.text_type(e))
|
||||||
raise exception.ZunException(six.text_type(e))
|
raise exception.ZunException(six.text_type(e))
|
||||||
if not image:
|
if not image:
|
||||||
raise exception.ImageNotFound("Image %s not found" % repo)
|
raise exception.ImageNotFound("Image %s not found" % repo)
|
||||||
@ -98,8 +98,8 @@ def search_image(context, image_name, image_driver, exact_match):
|
|||||||
exact_match)
|
exact_match)
|
||||||
images.extend(imgs)
|
images.extend(imgs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception(('Unknown exception occurred while searching '
|
LOG.exception('Unknown exception occurred while searching '
|
||||||
'for image: %s'), six.text_type(e))
|
'for image: %s', six.text_type(e))
|
||||||
raise exception.ZunException(six.text_type(e))
|
raise exception.ZunException(six.text_type(e))
|
||||||
return images
|
return images
|
||||||
|
|
||||||
|
@ -144,8 +144,8 @@ class WalkVersionsMixin(object):
|
|||||||
if check:
|
if check:
|
||||||
check(engine, data)
|
check(engine, data)
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.error(("Failed to migrate to version %(version)s on engine "
|
LOG.error("Failed to migrate to version %(version)s on engine "
|
||||||
"%(engine)s"),
|
"%(engine)s",
|
||||||
{'version': version, 'engine': engine})
|
{'version': version, 'engine': engine})
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user