← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1493947] Re: serialize_args throws UnicodeError when message contains non-ascii characters

 

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

** Changed in: nova
    Milestone: None => liberty-rc1

-- 
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/1493947

Title:
  serialize_args throws UnicodeError when message contains non-ascii
  characters

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The EventReporter attempts to serialize exception messages and raises
  another error in doing so if the message contains non-ascii
  characters, masking the original exception.

     File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 89, in wrapped
       payload)
     File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 119, in __exit__
       six.reraise(self.type_, self.value, self.tb)
     File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 72, in wrapped
       return f(self, context, *args, **kw)
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 349, in decorated_function
       LOG.warning(msg, e, instance_uuid=instance_uuid)
     File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 119, in __exit__
       six.reraise(self.type_, self.value, self.tb)
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 320, in decorated_function
       return function(self, context, *args, **kwargs)
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 399, in decorated_function
       return function(self, context, *args, **kwargs)
     File "/usr/lib/python2.7/dist-packages/nova/compute/utils.py", line 492, in __exit__
       exc_tb=exc_tb, want_result=False)
     File "/usr/lib/python2.7/dist-packages/nova/objects/base.py", line 487, in wrapper
       kwargs[k] = str(v)
     File "/usr/lib/python2.7/dist-packages/oslo_i18n/_message.py", line 167, in __str__
       raise UnicodeError(msg)
   UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.

  Found in Liberty

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1493947/+subscriptions


References