Description of problem: While performing merge from upstream sprint 58 I noticed that in OSE 2.1 the nodejs cartridge upgrade script contained the following code: From 2.1 GA's openshift-origin-cartridge-nodejs-1.24.3.3-1.el6op: if version_lt $old_cart_version $OSE_21_GA; then if [ -f ${OPENSHIFT_NODEJS_DIR}env/LD_LIBRARY_PATH ]; then rm -f ${OPENSHIFT_NODEJS_DIR}env/LD_LIBRARY_PATH fi update-configuration $nodejs_version fi From 2.1.z's openshift-origin-cartridge-nodejs-1.24.3.7-1.el6op: if [[ $new_cart_version == "0.0.17.3" ]]; then update-configuration $nodejs_version fi Ultimately the problem that was trying to be addressed in openshift-origin-cartridge-nodejs-1.24.3.7-1.el6op is the addition of the v8 SCL dependency for the nodejs cartridge. However, admins in OSE can upgrade from version 0.0.17 of the cartridge directly to a version older than 0.0.17.3. This would mean the if statement in 2.1.z's nodejs cartridge would never run. However, it's more complicated than that. If they we're upgrading from 2.0.z to 2.1 update-configuration would run and fix both problem at the same time. This bug may never have actually been encountered in the wild for OSE customers. In reality they may have deleted their gears when they hit this problem and and after recreating them the problem would go away. However, I would like to fix any potentially broken gears and ensure that this runs for any gears that upgrade to the latest nodejs cartridge.
The easiest way to test this would be manually break a nodejs gear by editing $OPENSHIFT_NODEJS_DIR/env/OPENSHIFT_NODEJS_PATH_ELEMENT $OPENSHIFT_NODEJS_DIR/env/OPENSHIFT_NODEJS_LD_LIBRARY_PATH_ELEMENT. Essentially you want to verify that this block of code is run when the cartridge upgrade is performed: https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-nodejs/lib/util#L21
Check on puddle [2.2.z/2014-12-08.2] 1. install the env for ose-2.1 2. create apps #rhc app create nodejs nodejs 3. modify the env on nodejs [nodejs-xiaom.ose-21.com.cn 5486988687692b817500003a]\> env|grep PATH MANPATH=/opt/rh/nodejs010/root/usr/share/man OPENSHIFT_NODEJS_PATH_ELEMENT=/opt/rh/nodejs010/root/usr/bin OPENSHIFT_NODEJS_LD_LIBRARY_PATH_ELEMENT=/opt/rh/nodejs010/root/usr/lib64 LD_LIBRARY_PATH=/opt/rh/nodejs010/root/usr/lib64 OPENSHIFT_HAPROXY_PATH_ELEMENT=/var/lib/openshift/5486988687692b817500003a/haproxy/usr/bin PATH=/opt/rh/nodejs010/root/usr/bin:/var/lib/openshift/5486988687692b817500003a/haproxy/usr/bin:/bin:/usr/bin:/usr/sbin 4. Upgrade the env 5. Check the env in nodejs [nodejs-xiaom.ose-21.com.cn 5486988687692b817500003a]\> 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/5486988687692b817500003a/app-root/runtime/repo/node_modules/.bin:/var/lib/openshift/5486988687692b817500003a//.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 OPENSHIFT_HAPROXY_PATH_ELEMENT=/var/lib/openshift/5486988687692b817500003a/haproxy/usr/bin PATH=/var/lib/openshift/5486988687692b817500003a/app-root/runtime/repo/node_modules/.bin:/var/lib/openshift/5486988687692b817500003a//.node_modules/.bin:/opt/rh/nodejs010/root/usr/bin:/var/lib/openshift /5486988687692b817500003a/haproxy/usr/bin:/bin:/usr/bin:/usr/sbin The code in the PR works.
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-0019.html