Bug 1108951
| Summary: | Node 0.10 Cartridge shown as v0.6.20 node js version | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Online | Reporter: | rizki <rizki.priyadarma> | ||||
| Component: | Image | Assignee: | Paul Morie <pmorie> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 1.x | CC: | bmeng, jokerman, mmccomas, niharvey, rleaf, yadu | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-07-15 10:30:33 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: |
|
||||||
Test on INT(devenv_4861), issue can be reproduced. [n10-111.int.rhcloud.com 539a65a26cec0ec127000135]\> node -v v0.6.20 [n10-111.int.rhcloud.com 539a65a26cec0ec127000135]\> scl enable v8314 nodejs010 "node --version" v0.10.25 [n10-111.int.rhcloud.com 539a65a26cec0ec127000135]\> env | grep PATH MANPATH=/opt/rh/v8314/root/usr/share/man:: OPENSHIFT_NODEJS_PATH_ELEMENT=/var/lib/openshift/539a65a26cec0ec127000135//.node_modules/.bin:/usr/bin OPENSHIFT_NODEJS_LD_LIBRARY_PATH_ELEMENT=/opt/rh/v8314/root/usr/lib64 LD_LIBRARY_PATH=/opt/rh/v8314/root/usr/lib64 PATH=/var/lib/openshift/539a65a26cec0ec127000135//.node_modules/.bin:/usr/bin:/bin:/usr/bin:/usr/sbin *** Bug 1109296 has been marked as a duplicate of this bug. *** *** Bug 1109347 has been marked as a duplicate of this bug. *** Reproduced in my devenv This is happening because nodejs 0.10 is used via the SCL, and 'node' will get the system node. I will add a wrapper function to rhcsh to ensure that you get the right version when running 'node' in an ssh session to a gear. PR submitted https://github.com/openshift/origin-server/pull/5509 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/034441a3298525fe5356d0f44ddff2e181143d12 Fix bug 1108951: add rhcsh wrapper for nodejs Checked on devenv_4869, issue still exists. [no10-bmengdev1.dev.rhcloud.com 539e92616feb463bf9000001]\> env|grep OPENSHIFT_NODEJS_VERSION OPENSHIFT_NODEJS_VERSION=0.10 [no10-bmengdev1.dev.rhcloud.com 539e92616feb463bf9000001]\> node -v v0.6.20 No sure if this related to rhcsh, but I think at least the OPENSHIFT_NODEJS_PATH_ELEMENT should contain the nodejs010 binary path as how other scl cartridges work. [no10-bmengdev1.dev.rhcloud.com 539e92616feb463bf9000001]\> env|grep OPENSHIFT_NODEJS_PATH OPENSHIFT_NODEJS_PATH_ELEMENT=/var/lib/openshift/539e92616feb463bf9000001//.node_modules/.bin:/usr/bin example for other scl cartridge: [php54-bmengdev1.dev.rhcloud.com 539e9a286feb46204d000002]\> env|grep PATH_ELEMENT OPENSHIFT_PHP_PATH_ELEMENT=/var/lib/openshift/539e9a286feb46204d000002/php/phplib/pear/pear:/opt/rh/php54/root/usr/bin:/var/lib/openshift/539e9a286feb46204d000002/php/usr/bin PR submitted with fix. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/136cd0d226113e5a6fdb9c4b541a9632ae34fed3 Fix bug 1108951: fix rhcsh 'node' wrapper Checked on devenv_4874, the node version shows 0.10.25 when check the node version in rhcsh. But still get the wrong version when sending command via ssh (w/o rhcsh option added). # rhc ssh no10 --command "node --version" v0.6.20 # ssh 539fe0c2b9187783b2000080.rhcloud.com "node -v" v0.6.20 # ssh 539fe0c2b9187783b2000080.rhcloud.com rhcsh "node -v" v0.10.25 We should also make the node has correct version when sending command via ssh w/o rhcsh command added. For eg, PHP 5.4 # ssh 539fe191b9187783b20000b9.rhcloud.com "php --version" PHP 5.4.16 (cli) (built: Feb 4 2014 08:10:51) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies I see the real root cause now - there was a problem setting the PATH_ELEMENT env var for nodejs. PR submitted: https://github.com/openshift/origin-server/pull/5522 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/b434574b707dad96d10be954711294529cd8791c Fix bug 1108951: correct nodejs update-configuration function Test on devenv_4882, issue have been fixed. [n10a-dyy.dev.rhcloud.com 53a1828f8d925f26900000cd]\> node --version v0.10.25 Connection to n10a-dyy.dev.rhcloud.com closed. dhcp-14-104:test duyan$ rhc ssh n10a --command "node --version" v0.10.25 [n10a-dyy.dev.rhcloud.com 53a1828f8d925f26900000cd]\> env | grep PATH MANPATH=/opt/rh/nodejs010/root/usr/share/man:/opt/rh/v8314/root/usr/share/man:: OPENSHIFT_NODEJS_PATH_ELEMENT=/var/lib/openshift/53a1828f8d925f26900000cd//.node_modules/.bin:/opt/rh/nodejs010/root/usr/bin OPENSHIFT_NODEJS_LD_LIBRARY_PATH_ELEMENT=/opt/rh/nodejs010/root/usr/lib64:/opt/rh/v8314/root/usr/lib64 LD_LIBRARY_PATH=/opt/rh/nodejs010/root/usr/lib64:/opt/rh/v8314/root/usr/lib64 PATH=/var/lib/openshift/53a1828f8d925f26900000cd//.node_modules/.bin:/opt/rh/nodejs010/root/usr/bin:/bin:/usr/bin:/usr/sbin Move bug to verified. |
Created attachment 908336 [details] Node 0.10 Cartridge shown as v0.6.20 node js version Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.Create node js 0.10 cartridge 2.open app through ssh 3.node -v Actual results:v0.6.20 Expected results:v0.10.25