Bug 856487
Summary: | Can't connect to mongodb-2.0 for ruby1.9 app successfully on stage | ||||||
---|---|---|---|---|---|---|---|
Product: | OKD | Reporter: | Wei Sun <wsun> | ||||
Component: | Containers | Assignee: | Adam Miller <admiller> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2.x | CC: | cgole, dmace, mgao, qgong, rmillner, xtian | ||||
Target Milestone: | --- | Keywords: | Regression, Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-11-06 18:48:24 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
scalabe ruby1.9 app can embed mongodb successfully,but can't use it step: 1.create a scalable ruby-1.9 app 2.embed mongodb-2.0 for it [wsun@localhost dev]$ rhc app cartridge add -a rack9scaletest -c mongodb-2.0 Password: RESULT: MongoDB 2.0 database added. Please make note of these credentials: Root User: admin Root Password: cf-RtCkhuckQ Database Name: rack9scaletest Connection URL: mongodb://60f9dfe0e1-wsundev912.dev.rhcloud.com:35556/ MongoDB gear-local connection URL: mongodb://127.0.252.129:35556/ 3.ssh 4.mongo [rack9scaletest-wsundev912.dev.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass The same issue exits in the website , both the ruby 1.9 and rubyonrails app cannot embed mongodb in the website. The problem here appears to be that ruby-1.9's configure script creates an entry for LD_LIBRARY_PATH in the .env directory. This is sourced by the mongodb control script and disrupts mongodb by causing the wrong libjs to be loaded. Paul and Dan working on this and have identified root cause Temporary fix for mongo with pull request: https://github.com/openshift/crankcase/pull/478 Waiting on merge. Longer term need a way to address sclized versions. on devenv_2172 ,can add mongodb-2.0 for ruby 1.9 app,but could not connection mongo info: [rack9test-wsundev1913.dev.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass 1.create ruby 1.9 app 2.add mongodb [sunwei@dhcp-8-229 dev]$ rhc app cartridge add -a rack9test -c mongodb-2.0 Password: RESULT: MongoDB 2.0 database added. Please make note of these credentials: Root User: admin Root Password: xSChdRyH2e_V Database Name: rack9test Connection URL: mongodb://127.0.250.129:27017/ You can manage your new MongoDB by also embedding rockmongo-1.1 3.ssh app mongo [rack9test-wsundev1913.dev.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass *** Bug 856956 has been marked as a duplicate of this bug. *** Workaround: is to unset LD_LIBRARY_PATH on rhcsh. The issue is the new version of mongo uses libjs.so which is getting pulled from the ruby193 scl. I'll fix the mongo function in rhcsh. But you can still hit this if you run /usr/bin/mongo -- the fix for that would be a longer term solution to address sclized versions and provide a mechanism to run the binaries therein. Waiting on pull request: https://github.com/openshift/li/pull/367 Please note that the workaround above as it is required if accessing other mongo utilities. The issue is the ruby193 scl is needed for running irb/ruby -- users of a ruby-1.9 app would expect an equivalent functionality (ruby version) matching the app. verified on devenv_2176 step: 1.create a ruby1.9 app 2. add mongodb-2.0 for app 3.ssh app 4. mongo result: [rack9test-wsundev914.dev.rhcloud.com ~]\> mongo MongoDB shell version: 2.0.7 connecting to: 127.0.250.129:27017/admin > [rack9scaletest-wsundev914.dev.rhcloud.com ~]\> mongo MongoDB shell version: 2.0.7 connecting to: 268ce17e05-wsundev914.dev.rhcloud.com:35536/admin > But it doesn't work on stg(devenv-stage_235) [rack9test-wsunstg914.stg.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass It doesn't work on devenv-stage_236 [rack9test-wsundevs914.dev.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass It doesn't work on stage(devenv-stage_237) [rack9test-wsunstg914.stg.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass It still doesn't work on stage(devenv-stage_237),so I re-open this bug. step: 1. for non-scaling ruby1.9 app Result: [rack9test-wsunstg917.stg.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass info: Application Info ================ rack9test Framework: ruby-1.9 Creation: 2012-09-17T01:50:37-04:00 UUID: 4d3b1db7af0f42699b337f60fa9478e8 Git URL: ssh://4d3b1db7af0f42699b337f60fa9478e8.rhcloud.com/~/git/rack9test.git/ Public URL: http://rack9test-wsunstg917.stg.rhcloud.com/ Embedded: mongodb-2.0 - Connection URL: mongodb://127.6.95.129:27017/ 2.for scaling ruby1.9 app Result: [rack9scaletest-wsundevstg917.dev.rhcloud.com ~]\> mongo /usr/bin/mongo: symbol lookup error: /usr/bin/mongo: undefined symbol: js_DateClass info: Application Info ================ rack9scaletest Framework: ruby-1.9 Creation: 2012-09-17T02:07:00-04:00 UUID: 44fc14e402914dada18616ce95d66949 Git URL: ssh://44fc14e402914dada18616ce95d66949.rhcloud.com/~/git/rack9scaletest.git/ Public URL: http://rack9scaletest-wsundevstg917.dev.rhcloud.com/ Embedded: haproxy-1.4 mongodb-2.0 - Connection URL: mongodb://06636e3d6d-wsundevstg917.dev.rhcloud.com:35616/ As mentioned, there's a workaround for stage. And it doesn't address all cases -- see comment #9. I created a pull request for stage -- https://github.com/openshift/li/pull/378 Spoke to admiller and he will merge it if it is really needed. Assigning to admiller. Adam, please close/assign to QA as we deem neccessary. Thanks. tested this with the workaround on devenv-stage_237 refer comment 9 for full fix for this bug. 1. Create ruby 1.9 app 2. embed mongo 3. log in to the apps gear and 'unset LD_LIBRARY_PATH' [rb-cgoledfvv.dev.rhcloud.com ~]\> mongo MongoDB shell version: 2.0.7 connecting to: 127.0.250.129:27017/admin After discussions it was decided Ram's patch was the most logical course of action right now. Patch was merged, package was built. Package rhc-node-0.98.7-1.el6_3 should be available via devenv-stage_238 Correction, it would appear there was a race condition in the build for 238 that caused apache to not start and that caused the validation to fail, which failed the ami build. This will be available in devenv-stage_239 verified on devenv-stage_239
step:
1.create ruby1.9 app
2.add mongodb-2.0
3.log in to the apps gear
Result:
1.for non-scaling app
[rack9test-wsundevstg918.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.0.7
connecting to: 127.0.250.129:27017/admin
>
2.for scaling app
[rack9scaletest-wsundevstg918.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.0.7
connecting to: 98a8ac89ff-wsundevstg918.dev.rhcloud.com:35551/admin
>
verified on stage(devenv-stage_239)
Result:
1.non-scaling app
[ruby9-bmengstg918.stg.rhcloud.com ~]\> mongo
MongoDB shell version: 2.0.7
connecting to: 127.8.165.1:27017/admin
>
2.scaling app
[ruby9s-bmengstg918.stg.rhcloud.com ~]\> mongo
MongoDB shell version: 2.0.7
connecting to: 1c1a2098c1-bmengstg918.stg.rhcloud.com:50441/admin
>
|
Created attachment 612001 [details] development.log Description of problem: Can't embed mongodb for non-scalable ruby1.9 app Version-Release number of selected component (if applicable) devenv_2156 rhc 0.98.14 How reproducible: always Steps to Reproduce: 1.create ruby1,9 app rhc app create -a rack9test -t ruby-1.9 2.embed mongodb-2.0 rhc app cartridge add -a rack9test -c mongodb-2.0 3. Actual results: Can't embed mongodb [sunwei@dhcp-8-229 int]$ rhc app cartridge add -a rack9test -c mongodb-2.0 Password: ****** Problem reported from server. Response code was 500. Re-run with -d for more information. RESULT: Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support. Expected results: can embed mongodb Additional info: can embed mongodb for scalable app ,and can embed mongodb for other cartridge