Hi Idan Kinory,





I deploy Vitrage with devstack using master branch.


Currently I found a error in Aodh datasource when I change the Aodh alarm 
state(alarm_state_transition notification).






The error log is as follows:


Oct 27 07:30:50 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:30:50.429 
9880 DEBUG vitrage.datasources.listener_service [-] EVENT ENQUEUED:
Oct 27 07:30:50 dwj-vitrage vitrage-collector[9880]: {'description': u'Alarm 
when * event occurred.', 'resource_id': None, 'vitrage_entity_type': 'aodh', 
'timestamp': u'2017-10-26T06:37:41.353447', 'state_timestamp': 
u'2017-10-27T07:09:06.636137', 'name': u'dwj', 'vitrage_datasource_action': 
'update', 'severity': u'low', 'vitrage_sample_date': '2017-10-27 
07:30:50.382730+00:00', 'vitrage_event_type': u'alarm.deletion', 'enabled': 
True, 'alarm_id': u'9578d0eb-5d09-49a2-80e9-fb1a6c7ce7e9', 'state': u'alarm', 
'repeat_actions': False, 'event_type': (u'*',), 'project_id': 
u'378f268c64fc42c28226704dd71f37fe', 'type': u'event'} _enqueue_events 
/opt/stack/vitrage/vitrage/datasources/listener_service.py:106
Oct 27 07:31:02 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:31:02.327 
10104 DEBUG vitrage.datasources.services [-] start get changes _get_changes 
/opt/stack/vitrage/vitrage/datasources/services.py:119
Oct 27 07:31:02 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:31:02.331 
10104 DEBUG vitrage.datasources.services [-] end get changes _get_changes 
/opt/stack/vitrage/vitrage/datasources/services.py:126
Oct 27 07:31:12 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:31:12.087 
9880 ERROR vitrage.datasources.aodh.driver [-] Failed to Convert alarm state 
transition event - 'dict' object has no attribute 'encode': AttributeError: 
'dict' object has no attribute 'encode'
Oct 27 07:31:12 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:31:12.087 
9880 ERROR vitrage.datasources.aodh.driver Traceback (most recent call last):
Oct 27 07:31:12 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:31:12.087 
9880 ERROR vitrage.datasources.aodh.driver   File 
"/opt/stack/vitrage/vitrage/datasources/aodh/driver.py", line 352, in 
_convert_alarm_state_transition_event
Oct 27 07:31:12 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:31:12.087 
9880 ERROR vitrage.datasources.aodh.driver     unicode_to_str = 
state.encode("ascii")
Oct 27 07:31:12 dwj-vitrage vitrage-collector[9880]: 2017-10-27 07:31:12.087 
9880 ERROR vitrage.datasources.aodh.driver AttributeError: 'dict' object has no 
attribute 'encode'



I noticed that you fix the code in this patch(Line 352-368): 
https://review.openstack.org/#/c/501701/4/vitrage/datasources/aodh/driver.py


Can you please explain why? Thanks.




BR,

dwj
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to