incorrect format type in BigSwitch plugin log line

Bug #1220521 reported by Kevin Benton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Kevin Benton

Bug Description

The BigSwitch plugin incorrectly tries to log the response code it gets from an HTTP request as an integer when it should be a string, resulting in these errors in the output:
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 846, in emit
    msg = self.format(record)
  File "/opt/stack/neutron/neutron/openstack/common/log.py", line 552, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/opt/stack/neutron/neutron/openstack/common/log.py", line 516, 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: %d format: a number is required, not str
Logged from file plugin.py, line 339

Tags: bigswitch
Changed in neutron:
assignee: nobody → Kevin Benton (blak111)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
milestone: none → havana-3
tags: added: bigswitch
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/45006
Committed: http://github.com/openstack/neutron/commit/d6f50e8476feb3c76db485fa033d0b1c22ee024d
Submitter: Jenkins
Branch: master

commit d6f50e8476feb3c76db485fa033d0b1c22ee024d
Author: Kevin Benton <email address hidden>
Date: Thu Aug 29 15:16:00 2013 -0700

    Fixes formatting exception from logging in BigSwitch plugin

    Corrects the data type expected for the HTTP code that comes
    back from the back-end controller in a debug log call.

    Closes-Bug: #1220521
    Change-Id: Ic71b24c724222ade5e695addf291c6488d665da9

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.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.