This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1265976 - [origin_devexp_679]Error appears when login in mongodb26 database in container for both centos7 and rhel7
[origin_devexp_679]Error appears when login in mongodb26 database in containe...
Status: CLOSED ERRATA
Product: Red Hat Software Collections
Classification: Red Hat
Component: rh-mongodb26-docker (Show other bugs)
rh-mongodb26
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Marek Skalický
wewang
:
Depends On:
Blocks: 1220712
  Show dependency treegraph
 
Reported: 2015-09-24 04:49 EDT by wewang
Modified: 2015-11-16 10:56 EST (History)
5 users (show)

See Also:
Fixed In Version: rhscl/mongodb-26-rhel7:2.6-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-16 10:56:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wewang 2015-09-24 04:49:39 EDT
Version-Release number of selected component (if applicable):
devenv-fedora_2387
centos/mongodb-26-centos7       17d33d90862d
rhscl/mongodb-26-rhel7               027d85807877

Description of problem:
when login in mongodb26 in container, appears error "open for '//.mongorc.js' failed with errno:13 Permission denied"

How reproducible:
Always

Steps to Reproduce:
1.Run the mongodb-26-centos7 image
$  mkdir -p /home/user/database && chown -R 234523:998 /home/user/database
$  docker run -d -u 234523 -e MONGODB_USER=user -e MONGODB_PASSWORD=pass -e MONGODB_DATABASE=test_db -e MONGODB_ADMIN_PASSWORD=pass -v /home/user/database:/var/lib/mongodb/data:Z  centos/mongodb-26-centos7

2.Access into container
$docker ps | grep mongo  (to get the container id)
$docker inspect <container_id> | grep IPAddress
$docker exec -ti <container_id> scl enable rh-mongodb26 /bin/bash

3. Create SQL queries in container 
bash-4.2$ mongo test_db -u user -p pass 
MongoDB shell version: 2.6.9
connecting to: test_db
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-24T03:17:01.840+0000 In File::open(), ::open for '//.mongorc.js' failed with errno:13 Permission denied
>

Actual results:
when Login in mongodb26 in container, appear errors
Expected results:
login in successfully ,no errors
Comment 1 Ben Parees 2015-09-24 09:57:51 EDT
wewang:  for images being provided by the SCL team, i'll be reassigning these bugs to their components, is that going to cause a problem for your processes/reporting?

SCL team:  the openshift QE team expects you'll move the bug to ON_QA once it is ready for them to re-test.
Comment 2 wewang 2015-09-24 21:59:40 EDT
Ben Parees:ok,and give similar  errors like :
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-25T01:57:32.520+0000 In File::open(), ::open for '//.mongorc.js' failed with errno:13 Permission denied
> show dbs;
2015-09-25T01:57:49.423+0000 listDatabases failed:{
	"ok" : 0,
	"errmsg" : "not authorized on admin to execute command { listDatabases: 1.0 }",
	"code" : 13
} at src/mongo/shell/mongo.js:47
>
Comment 3 Marek Skalický 2015-10-12 08:40:13 EDT
Should be fixed in upstream by this pull request - https://github.com/openshift/mongodb/pull/91

I am going to sync it to the dist-git soon...
Comment 4 wewang 2015-10-16 04:51:34 EDT
verified in devenv_fedora_2444
centos/mongodb-26-centos7    image_id:3c37801bcaa6
rhscl/mongodb-26-rhel7       image_id:fccbcf0c20d7

bash-4.2$ mongo test_db -u user -p pass 
MongoDB shell version: 2.6.9
connecting to: test_db
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
> show collections;
> doc={"a":"test1"};
{ "a" : "test1" }
Comment 7 errata-xmlrpc 2015-11-16 10:56:14 EST
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.