Version-Release number of selected component (if applicable): devenv-fedora_2396 centos/mongodb-26-centos7 ef7c6cc1245e rhscl/mongodb-26-rhel7 201b0b69dd4e Description of problem: When change the admin and user password of mongodb, connect db using new password, error appears like: Error: 18 { ok: 0.0, errmsg: "auth failed", code: 18 } at src/mongo/shell/db.js:1260 How reproducible: Always Steps to Reproduce: 1. Setup nfs server 2. Create pv on master 3.Create imagestream and deploy mongodb-26-centos7 image in openshift $oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/image-streams/extra-image-streams-centos7.json $oc process -f examples/db-templates/mongodb-persistent-template.json | oc create -f - 4. Check the pod is running #oc get pods 5. Access mongodb # oc rsh mongodb-1-tf358 bash-4.2$ mongo sampledb -u userTP7 -p3mTi1WiM4EBGa1KT 6. Change the admin and user password of mongodb $ oc env dc/mongodb MONGODB_PASSWORD=NewPassrod MONGODB_ADMIN_PASSWORD=NewPassrod 7. Verify the password in pod have changed # oc env pods mongodb-2-cepng --list # pods mongodb-2-cepng, container mongodb MONGODB_USER=userTP7 MONGODB_PASSWORD=NewPassrod MONGODB_DATABASE=sampledb MONGODB_ADMIN_PASSWORD=NewPassrod 8. Verify can connect to mongodb using new password and all the data still exist after change password. # oc rsh mongodb-2-cepng bash-4.2$ mongo sampledb -u userTP7 -pNewPassrod MongoDB shell version: 2.6.9 connecting to: sampledb 2015-09-25T02:04:14.198+0000 Error: 18 { ok: 0.0, errmsg: "auth failed", code: 18 } at src/mongo/shell/db.js:1260 exception: login failed 9. Using old password to connect mongodb bash-4.2$ mongo sampledb -u userTP7 -p3mTi1WiM4EBGa1KT MongoDB shell version: 2.6.9 connecting to: sampledb Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, see http://docs.mongodb.org/ Questions? Try the support group http://groups.google.com/group/mongodb-user 2015-09-25T02:04:42.287+0000 In File::open(), ::open for '//.mongorc.js' failed with errno:13 Permission denied > Actual results: Cannnot using new password to connect to mongdb26 Expected results: Can using new password to connect to mongdb26 Additional info:
This is fixed in upstream by this PR - https://github.com/openshift/mongodb/pull/97 So please test.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2056.html