collector can not store sahara events with key _sahara_tag_2.7.1

Bug #1676967 reported by ChanYiLin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panko
New
Undecided
Unassigned

Bug Description

Hi,
after allowing ceilometer to store events, I found this errors in my collector.log

ERROR ceilometer.collector [-] Dispatcher failed to handle the event, requeue it.
ERROR ceilometer.collector Traceback (most recent call last):
ERROR ceilometer.collector File "/usr/lib/python2.7/site-packages/ceilometer/collector.py", line 161, in sample
ERROR ceilometer.collector self.dispatcher_manager.map_method(self.method, samples)
ERROR ceilometer.collector File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 252, in map_method
ERROR ceilometer.collector method_name, *args, **kwds)
ERROR ceilometer.collector File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 225, in map
ERROR ceilometer.collector self._invoke_one_plugin(response.append, func, e, args, kwds)
ERROR ceilometer.collector File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 256, in _invoke_one_plugin
ERROR ceilometer.collector response_callback(func(e, *args, **kwds))
ERROR ceilometer.collector File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 230, in _call_extension_method
ERROR ceilometer.collector return getattr(extension.obj, method_name)(*args, **kwds)
ERROR ceilometer.collector File "/usr/lib/python2.7/site-packages/ceilometer/dispatcher/database.py", line 133, in record_events
ERROR ceilometer.collector self.event_conn.record_events(event_list)
ERROR ceilometer.collector File "/usr/lib/python2.7/site-packages/ceilometer/event/storage/pymongo_base.py", line 72, in record_events
ERROR ceilometer.collector raise error
ERROR ceilometer.collector InvalidDocument: key '_sahara_tag_2.7.1' must not contain '.'
ERROR ceilometer.collector

but _sahara_tag_2.7.1 is generated by sahara aotumatically in custom Properties after register the image.

Is there any solution?
Thanks!

Revision history for this message
gordon chung (chungg) wrote :

are you storing raw events?

i imagine it's possible to catch this error and disregard... or create a normalizer plugin but i think that would be very slow.

Revision history for this message
gordon chung (chungg) wrote :

changing this to panko as it's more related to storage...

affects: ceilometer → panko
Revision history for this message
Shaoman Zhang (zhang-shaoman) wrote :

I met the same question in Pike. If config to store raw info, and contain '.' in raw, mongodb will raise exception.

2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base [-] Failed to record event: key 'metering.stack' must not contain '.': InvalidDocument: key 'metering.stack' must not contain '.'
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base Traceback (most recent call last):
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib/python2.7/site-packages/panko/storage/pymongo_base.py", line 64, in record_events
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base 'traits': traits, 'raw': event_model.raw})
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 171, in wrapped_f
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base return self.call(f, *args, **kw)
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 248, in call
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base start_time=start_time)
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 203, in iter
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base return fut.result()
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 396, in result
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base return self.__get_result()
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 251, in call
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base result = fn(*args, **kwargs)
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 467, in insert_one
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base return InsertOneResult(self._insert(sock_info, document),
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 430, in _insert
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base gen(), check_keys, self.codec_options, sock_info)
2017-12-15 09:01:26.671 47547 ERROR panko.storage.pymongo_base InvalidDocument: key 'metering.stack' must not contain '.'

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.