← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1292993] Re: 'done trying' message is never logged in GlanceClientWrapper.call()

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-2

-- 
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):
  Fix Released

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


References