Bug 1371295 - mongoexport / mongoimport fail auth
Summary: mongoexport / mongoimport fail auth
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Timothy Williams
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-29 20:18 UTC by M Chibani
Modified: 2017-06-01 14:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-31 18:22:11 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description M Chibani 2016-08-29 20:18:09 UTC
Description of problem:

mongoexport / mongoimport on db that is not named as the app name fail auth and send a fail message as follows:

connected to: 127.7.108.2
assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }


How reproducible:

tried it on two different gears and got the same results.


Steps to Reproduce:
1. mongoexport --db AnotherName --collection AnyCollection --out app-root/repo/data/Outputfile.json -u $OPENSHIFT_MONGODB_DB_USERNAME -p $OPENSHIFT_MONGODB_DB_PASSWORD -h $OPENSHIFT_MONGODB_DB_HOST

2 1. mongoimport --db AnotherName --collection AnyCollection 
--file Imputfile.json --type json -u $OPENSHIFT_MONGODB_DB_USERNAME 
-p $OPENSHIFT_MONGODB_DB_PASSWORD -h $OPENSHIFT_MONGODB_DB_HOST


Actual results:

connected to: 127.7.108.2
assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }

Expected results:

connected to: 127.8.212.2
Mon Aug 29 11:22:57.701 check X xxx
Mon Aug 29 11:22:57.730 exported / imported xxx objects

Additional info:

Not sure this the right place for this issue!! if it is not please advise. Thanks

Comment 1 Abhishek Gupta 2016-09-26 19:39:16 UTC
I have a couple of questions to help identify the issue and the use case and the appropriate fix.

Q1. How do we end up in this situation? Are you creating a new db on the existing mongo gear in your application via the mongo CLI?
Q2. If the above is true, what is the use case for creating a separate db in the gear?

Comment 2 M Chibani 2016-09-27 19:07:17 UTC
(In reply to Abhishek Gupta from comment #1)
> I have a couple of questions to help identify the issue and the use case and
> the appropriate fix.
> 
> Q1. How do we end up in this situation? Are you creating a new db on the
> existing mongo gear in your application via the mongo CLI?
> Q2. If the above is true, what is the use case for creating a separate db in
> the gear?

Initially the database was not on the gear.  From inside the app, I created / used the database without thinking of any changes and everything was working seamlessly. Then for a reason I wanted to import/export dbs content and got into the bug. From inside the app everythong is working. The only problem occurs when it come to import export with a name different than the app name. It seems that the gear architecture  allows only for one db. Not sure if that is the case. and if it is why.

Comment 3 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

Comment 4 M Chibani 2017-06-01 14:10:35 UTC
Understood


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