logging report UnicodeDecodeError when create vm with non-ascii

Bug #1734054 reported by Jiang
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Undecided
Unassigned

Bug Description

When create a vm with non-ascii name in devstack,nova sources from the master branch. logging report UnicodeDecodeError in nova-compute.log.

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
    msg = self.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/handlers.py", line 161, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 457, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 476, in format
    raise e
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 317: ordinal not in range(128)
Logged from file driver.py, line 5061

Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

Needs nova version.

Changed in nova:
status: New → Incomplete
Jiang (jiangpf)
description: updated
Changed in nova:
status: Incomplete → New
Revision history for this message
Matt Riedemann (mriedem) wrote :

Do you have a more full stacktrace than this, or the nova-compute log itself? This doesn't tell us much about where it originates from.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Looks like it's coming from the logging in this method:

https://github.com/openstack/nova/blob/faacfeb07646115e7c8c91584d0e467a3e0064d7/nova/virt/libvirt/driver.py#L5050

I'm sure I've seen this before, and it's likely something in the network_info, and I think we have duplicates of this bug...

Revision history for this message
Jiang (jiangpf) wrote :

I think this should be related to the name of the virtual machine. This error occurs only if I name the virtual machine with a non-ASCII encoding.

Revision history for this message
Jiang (jiangpf) wrote :

such as name the virtual machine with a chinese name.

Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
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.