UnicodeError when events enabled

Bug #1421430 reported by gordon chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
gordon chung

Bug Description

when enabling events in gate, an occasional unicode error is thrown when attempting to convert incoming notification to Event.

2015-02-11 23:55:48.327 28983 ERROR oslo_messaging.notify.dispatcher [-] Exception during message handling
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher Traceback (most recent call last):
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/notify/dispatcher.py", line 89, in _dispatch_and_handle_error
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher executor_callback)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/notify/dispatcher.py", line 129, in _dispatch
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher metadata)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/opt/stack/new/ceilometer/ceilometer/event/endpoint.py", line 59, in info
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher self.process_notification(notification)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/opt/stack/new/ceilometer/ceilometer/event/endpoint.py", line 63, in process_notification
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher event = self.event_converter.to_event(notification)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/opt/stack/new/ceilometer/ceilometer/event/converter.py", line 351, in to_event
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher return edef.to_event(notification_body)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/opt/stack/new/ceilometer/ceilometer/event/converter.py", line 234, in to_event
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher traits = [trait for trait in traits if trait is not None]
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/opt/stack/new/ceilometer/ceilometer/event/converter.py", line 232, in <genexpr>
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher for t in self.traits)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/opt/stack/new/ceilometer/ceilometer/event/converter.py", line 142, in to_trait
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher value = models.Trait.convert_value(self.trait_type, value)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher File "/opt/stack/new/ceilometer/ceilometer/event/storage/models.py", line 120, in convert_value
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher return str(value)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher UnicodeEncodeError: 'ascii' codec can't encode character u'\u20a1' in position 0: ordinal not in range(128)
2015-02-11 23:55:48.327 28983 TRACE oslo_messaging.notify.dispatcher

http://logs.openstack.org/04/155104/1/check/check-tempest-dsvm-full/95e13c4/logs/screen-ceilometer-anotification.txt.gz?level=TRACE

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

Reviewed: https://review.openstack.org/155501
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=7ae6145cb511d6021b75a61028b211874fb0787a
Submitter: Jenkins
Branch: master

commit 7ae6145cb511d6021b75a61028b211874fb0787a
Author: gordon chung <email address hidden>
Date: Thu Feb 12 16:51:43 2015 -0500

    unicode error in event converter

    it's possible that a unicode error be thrown when attempting to
    convert notification to event. this patch uses six to handle this
    issue.

    Closes-Bug: #1421430
    Change-Id: Icf450792fd2921344c2a432e5a72be18dda33ac9

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