In versions of mongodb > 2.1 the way timestamp is returned in mongodb json is significantly different from the prior version. It has changed from being represented as
{ t : <time_t>, i : <ordinal> }
to
Timestamp(<time_t>, <ordinal>)
This is relevant when parsing the output of replication status for mongodb cluster.
The current regex (see https://github.com/openstack/trove/blob/master/trove/guestagent/datastore/mongodb/service.py#L268) cleanup cleans up mongo json by replacing functions with proper json format so it may be parsed like proper json. The regex is not strong enough to handle above Timestamp format though and just changes it to <time_t>, <ordinal> which breaks json format.
The suggested solution is to replace it with "<time_t>, <ordinal>" so json format is adhered to...
Fix proposed to branch: master /review. openstack. org/120877
Review: https:/