yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #11666
[Bug 1292993] [NEW] 'done trying' message is never logged in GlanceClientWrapper.call()
Public bug reported:
Here is the GlanceClientWrapper.call method from nova.image.glance:
try:
return getattr(client.images, method)(*args, **kwargs)
except retry_excs as e:
host = self.host
port = self.port
extra = "retrying"
error_msg = (_("Error contacting glance server "
"'%(host)s:%(port)s' for '%(method)s', "
"%(extra)s.") %
{'host': host, 'port': port,
'method': method, 'extra': extra})
if attempt == num_attempts:
extra = 'done trying'
LOG.exception(error_msg)
raise exception.GlanceConnectionFailed(
host=host, port=port, reason=str(e))
LOG.exception(error_msg)
time.sleep(1)
You will note that the lines:
extra = 'done trying'
LOG.exception(error_msg)
Will actually not produce a log message that says "done trying", because
error_msg has already been constructed with the extra interpolation
variable already set to "retrying" and LOG.exception(error_msg) does not
re-interpolate anything.
** Affects: nova
Importance: Undecided
Status: New
** Tags: glance logging low-hanging-fruit
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1292993
Title:
'done trying' message is never logged in GlanceClientWrapper.call()
Status in OpenStack Compute (Nova):
New
Bug description:
Here is the GlanceClientWrapper.call method from nova.image.glance:
try:
return getattr(client.images, method)(*args, **kwargs)
except retry_excs as e:
host = self.host
port = self.port
extra = "retrying"
error_msg = (_("Error contacting glance server "
"'%(host)s:%(port)s' for '%(method)s', "
"%(extra)s.") %
{'host': host, 'port': port,
'method': method, 'extra': extra})
if attempt == num_attempts:
extra = 'done trying'
LOG.exception(error_msg)
raise exception.GlanceConnectionFailed(
host=host, port=port, reason=str(e))
LOG.exception(error_msg)
time.sleep(1)
You will note that the lines:
extra = 'done trying'
LOG.exception(error_msg)
Will actually not produce a log message that says "done trying",
because error_msg has already been constructed with the extra
interpolation variable already set to "retrying" and
LOG.exception(error_msg) does not re-interpolate anything.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1292993/+subscriptions
Follow ups
References