Bug 1192557 - Application creation failure when specifying --from-code=empty along with db cartridge
Summary: Application creation failure when specifying --from-code=empty along with db ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1202514
TreeView+ depends on / blocked
 
Reported: 2015-02-13 16:59 UTC by Maciej Szulik
Modified: 2015-05-15 00:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1202514 (view as bug list)
Environment:
Last Closed: 2015-04-21 18:01:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Maciej Szulik 2015-02-13 16:59:07 UTC
Description of problem:
Whenever I want to create an application with empty git repository (using --from-code=empty) and I specify a db cart along language one I'm getting: 

Error: couldn't connect to server 127.1.245.130:27017 at src/mongo/shell/mongo.js:147
exception: connect failed

Everything works OK when not specifying DB cart, though.


How reproducible:
Always, if db cart is specified along lang. Tested it with python, nodejs, mongo and mysql in different combinations.


Steps to Reproduce:
1. rhc app-create errapp nodejs-0.10 mongodb-2.4 --from-code=empty


Actual results:
$ rhc app-create errapp nodejs-0.10 mongodb-2.4 --from-code=empty
Application Options
-------------------
Domain:      mydomain
Cartridges:  nodejs-0.10, mongodb-2.4
Source Code: empty
Gear Size:   default
Scaling:     no

Creating application 'errapp' ... 
MongoDB shell version: 2.4.9
connecting to: 127.1.245.130/test
Fri Feb 13 16:26:50.646 Error: couldn't connect to server 127.1.245.130:27017 at src/mongo/shell/mongo.js:147
exception: connect failed


Expected results:
Application gets created.

Comment 1 Maciej Szulik 2015-02-13 17:05:03 UTC
PR solving this is issue is here https://github.com/openshift/origin-server/pull/6074

Comment 2 openshift-github-bot 2015-02-13 22:56:03 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/eb1f5e3bb40be1af8f427f5837bc1ac8a996f6a7
Bug 1192557 - Fixed creating application using --from-code=empty when
database cartridge is also specified.

https://github.com/openshift/origin-server/commit/83d07c09735a06a0e7540b976e1ad81f0f60487c
Merge pull request #6074 from soltysh/bug1192557

Merged by openshift-bot

Comment 3 Wenjing Zheng 2015-02-17 03:47:50 UTC
Reopen on devenv_5433.
The app can be create successfully without previous error, but when try to access db after ssh to app, the similar error appears (mysql and postgresql works well with empty git repo):
[errapp-w.dev.rhcloud.com 54e2f9e091494a669c000001]\> mongo
MongoDB shell version: 2.4.9
connecting to: 127.1.244.2:27017/admin
Tue Feb 17 03:31:02.781 Error: couldn't connect to server 127.1.244.2:27017 at src/mongo/shell/mongo.js:147
exception: connect failed

Comment 4 Maciej Szulik 2015-02-23 13:00:15 UTC
Checked no devenv_5444 (ami-60ecbd08) works OK.

Comment 5 Ruikai Liu 2015-02-25 02:22:31 UTC
Tried on devenv_5449:

1. Create an app with empty repo and there's no error:
$ rhc app create errapp nodejs-0.10 mongodb-2.4 --from-code=empty --no-git

Application Options
-------------------
Domain:      ruliu0
Cartridges:  nodejs-0.10, mongodb-2.4
Source Code: empty
Gear Size:   default
Scaling:     no

Creating application 'errapp' ... An empty Git repository has been created for your application.  Use 'git push' to add your code.
done
...

2. SSH into the app and then access the db. No connection error:
$ rhc ssh errapp
[errapp-ruliu0.dev.rhcloud.com 54ed7639075437a983000001]\> mongo
MongoDB shell version: 2.4.9
connecting to: 127.1.244.2:27017/admin
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
>


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