virt: error in log when log exception in guestfs.py

Bug #1352768 reported by Jesse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Jesse

Bug Description

In this code review, https://review.openstack.org/#/c/104262/ brings an error in log because of the line at 137:
+ LOG.info(_LI("Unable to force TCG mode, libguestfs too old?"),
+ ex)

Error is:

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/opt/stack/nova/nova/openstack/common/log.py", line 685, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/opt/stack/nova/nova/openstack/common/log.py", line 649, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file guestfs.py, line 139

To fix this issue, we just need to add %s

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/111958

Changed in nova:
assignee: nobody → Jesse (jesse-5)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/111958
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=34558259058e19f9c4b2a96cbb97770883460ded
Submitter: Jenkins
Branch: master

commit 34558259058e19f9c4b2a96cbb97770883460ded
Author: jufeng <email address hidden>
Date: Tue Aug 5 16:30:59 2014 +0800

    Fix error in log when log exception in guestfs.py

    This code review: https://review.openstack.org/#/c/104262/
    brings an issue when log exception in guestfs.py at
    LOG.info(_LI("Unable to force TCG mode, libguestfs too old?")
    To fix this issue we just need to add %s in it.

    Change-Id: Ic33a6b7c2ce49e21e96a087984aba6656065d8fc
    Closes-bug: #1352768

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.