Bug 881815

Summary: use pymongo 2.3 instead of 2.1.1
Product: OKD Reporter: pengphy <pengphy>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmace, jhou, sannam
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: devenv_2564+ Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-19 19:27:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description pengphy@gmail.com 2012-11-29 16:01:06 UTC
Description of problem:

today i was running into a situation that when i inserted a record into mongodb, although that record inserted correctly, i got a 500 internal error, it complained about 'OperationFailure: need to login', but it works well in my local box, i googled a lot and find this https://jira.mongodb.org/browse/PYTHON-371 , checked pymongo version in openshift, it was 2.1.1, the workaround of this is specify the version in setup.py

ps:
https://openshift.redhat.com/community/forums/openshift/use-pymongo-23-instead-of-211

Comment 1 Paul Morie 2012-12-07 17:06:35 UTC
Adam Miller has graciously added python-pymongo 2.3 to our repo.  Reproducing this issue now.

Comment 2 Dan Mace 2012-12-07 18:28:47 UTC
Fixed in devenv_2564+, which contains python-pymongo-2.3-6.el6_3.x86_64.

Tested using the scenario outlined in https://jira.mongodb.org/browse/PYTHON-371, seems to be working well.

Comment 3 Jianwei Hou 2012-12-10 02:40:38 UTC
Verified on devenv_2577
python-pymongo-gridfs-2.3-6.el6_3.x86_64
python-pymongo-2.3-6.el6_3.x86_64


Steps:
1. Create python app and embed mongodb-2.2
2. ssh into gear, test using scenario outlined in https://jira.mongodb.org/browse/PYTHON-371

>>> import pymongo
>>> c = pymongo.Connection("127.0.250.129:27017")
>>> c.py1.authenticate('admin', '9AFwjDmTqJ2n')
True
>>> c.py1.foo.insert({'foo': 'bar'})
ObjectId('50c54a5c066f7158bcca2fb7')
>>> c.py1.foo.insert({'foo': 'bar'}, safe=True)
ObjectId('50c54a62066f7158bcca2fb8')
>>> c.py1.foo.find()
<pymongo.cursor.Cursor object at 0x7fcbddda4590>
>>> c.py1.foo.find_one()
{u'_id': ObjectId('50c54a5c066f7158bcca2fb7'), u'foo': u'bar'