Failures with pymongo 3.2
bittrance opened this issue · comments
Using pymongo 3.2, this module fails silently (as there is no error reporting in job subprocess). Complaints as follows. Both these can probably be solved with something like #6
/var/lib/shinken/modules/retention-mongodb/module.py:145: DeprecationWarning: remove is deprecated. Use delete_one or delete_many instead.
self.hosts_fs.remove({ '_id': { '$in': all_objs['hosts'].keys()}}, w=0, j=False, fsync=False)
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/var/lib/shinken/modules/retention-mongodb/module.py", line 145, in job
self.hosts_fs.remove({ '_id': { '$in': all_objs['hosts'].keys()}}, w=0, j=False, fsync=False)
File "/usr/local/lib/python2.7/dist-packages/pymongo/collection.py", line 2251, in remove
write_concern = WriteConcern(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymongo/write_concern.py", line 73, in __init__
raise ConfigurationError("Can not use w value "
ConfigurationError: Can not use w value of 0 with other options