Bug 1266399 - [origin_devexp_679]Mongodb cannot be connected after change admin and user password or re-deployment for persistent storage for centos7 and rhel7
Summary: [origin_devexp_679]Mongodb cannot be connected after change admin and user pa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: rh-mongodb26-container
Version: rh-mongodb26
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Marek Skalický
QA Contact: wewang
URL:
Whiteboard:
Depends On:
Blocks: 1220712
TreeView+ depends on / blocked
 
Reported: 2015-09-25 08:06 UTC by wewang
Modified: 2015-11-16 15:56 UTC (History)
5 users (show)

Fixed In Version: rhscl/mongodb-26-rhel7:2.6-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-16 15:56:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2056 0 normal SHIPPED_LIVE new container image: rhscl/mongodb-26-rhel7 2016-04-22 16:34:19 UTC

Description wewang 2015-09-25 08:06:10 UTC
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:

Comment 1 Marek Skalický 2015-10-22 13:35:47 UTC
This is fixed in upstream by this PR - https://github.com/openshift/mongodb/pull/97

So please test.

Comment 5 errata-xmlrpc 2015-11-16 15:56:21 UTC
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


Note You need to log in before you can comment on or make changes to this bug.