Comment 3 for bug 1676967

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 '.'