bad logging from baremetal_deploy_helper.py, line 217

Bug #1223253 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Unassigned
OpenStack Compute (nova)
Fix Released
High
Robert Collins

Bug Description

2013-09-10 07:48:36,767.767 5769 ERROR nova.virt.baremetal.deploy_helper [req-f649058f-8b8f-4392-a221-ca55a96178b0 None None] StdOut :
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(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 517, 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
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 17: ordinal not in range(128)
Logged from file baremetal_deploy_helper.py, line 217

Program stdout can be arbitrary bytes; we need to convert it to unicode before trying to log it.

Tags: baremetal
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/45838

Changed in nova:
assignee: nobody → Robert Collins (lifeless)
status: Triaged → In Progress
David Ripton (dripton)
Changed in nova:
milestone: none → havana-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/45838
Committed: http://github.com/openstack/nova/commit/605e5950751cd4d19ca7fd81c04c52cfa41ce7f6
Submitter: Jenkins
Branch: master

commit 605e5950751cd4d19ca7fd81c04c52cfa41ce7f6
Author: Robert Collins <email address hidden>
Date: Tue Sep 10 22:11:32 2013 +1200

    Fix logging of failed baremetal commands.

    Subprocess output is bytestrings, not unicode, so %r is the right
    format to use.

    Change-Id: Ia6cd0986d6970093c859775bb321ecea632e0264
    Closes-Bug: #1223253

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
status: New → In Progress
ZhiQiang Fan (aji-zqfan)
Changed in ironic:
status: In Progress → Incomplete
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-rc1 → 2013.2
Revision history for this message
aeva black (tenbrae) wrote :

This was included in the port of deploy-helper to ironic/drivers/modules/deploy_utils.py:

https://review.openstack.org/#/c/45394/

Changed in ironic:
status: Incomplete → Fix Committed
importance: Undecided → High
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-1 → 2014.1
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.