Hide Forgot
Description of problem: The invocation of npm link in bin/install is being run from the system context and not the SCL context when needed. How reproducible: Every time Steps to Reproduce: 1. rhc app create nodejs nodejs-0.10 2. rhc app ssh nodejs 3. ls -l nodejs/node_modules/ Actual results: Symlinks are pointing to system nodejs libs (/usr/lib/node_modules) Expected results: Symlinks should be pointing to SCL nodejs libs (/opt/rh/nodejs010/root/usr/lib/node_modules) Additional info: I created https://github.com/openshift/origin-server/pull/3924 to fix the nodejs cartridge, but a migration will need to be created for existing applications.
Working with Jason on the PR
https://github.com/openshift/origin-server/pull/4021 Note to QE: Please test migration as well for this bug.
test on devenv_3960, 1. For new app, Symlinks points to SCL nodejs libs (/opt/rh/nodejs010/root/usr/lib/node_modules) 2. For the old app after migration(devenv_stage ---> devenv_3959), there is no modules existed in nodejs/node_modules/ [n10-wsunmi2.dev.rhcloud.com 526f96618d8cea7403000059]\> ls -l nodejs/node_modules/ total 0 [n10-wsunmi2.dev.rhcloud.com 526f96618d8cea7403000059]\>
https://github.com/openshift/li/pull/2061 Yan Du, Please test running the migration again after running it the first time to make sure it is re-entrant. Also, you need to pass the --ignore-cartride-version flag, since the versions haven't been bumped up for this release yet. Thanks, Mrunal
Commit pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/a89d597a6d0b02234cb5d76e19411a4f1db20e59 Bug 1020553: Fix for handling the nodejs dependencies during the upgrade.
Upgrade devenv_stage_528 to devenv_3966 After migration, Symlinks points to SCL nodejs libs (/opt/rh/nodejs010/root/usr/lib/node_modules) for old nodejs-0.10 app too. [n10-dym.dev.rhcloud.com 52707bdfd8e8a76844000023]\> ls -l nodejs/node_modules/ total 0 lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 49 Oct 29 23:56 async -> /opt/rh/nodejs010/root/usr/lib/node_modules/async lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 51 Oct 29 23:56 connect -> /opt/rh/nodejs010/root/usr/lib/node_modules/connect lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 51 Oct 29 23:56 express -> /opt/rh/nodejs010/root/usr/lib/node_modules/express lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 54 Oct 29 23:56 formidable -> /opt/rh/nodejs010/root/usr/lib/node_modules/formidable lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 56 Oct 29 23:56 generic-pool -> /opt/rh/nodejs010/root/usr/lib/node_modules/generic-pool lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 48 Oct 29 23:56 mime -> /opt/rh/nodejs010/root/usr/lib/node_modules/mime lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 50 Oct 29 23:56 mkdirp -> /opt/rh/nodejs010/root/usr/lib/node_modules/mkdirp lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 51 Oct 29 23:56 mongodb -> /opt/rh/nodejs010/root/usr/lib/node_modules/mongodb lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 49 Oct 29 23:56 mysql -> /opt/rh/nodejs010/root/usr/lib/node_modules/mysql lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 55 Oct 29 23:56 node-static -> /opt/rh/nodejs010/root/usr/lib/node_modules/node-static lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 46 Oct 29 23:56 pg -> /opt/rh/nodejs010/root/usr/lib/node_modules/pg lrwxrwxrwx. 1 52707bdfd8e8a76844000023 52707bdfd8e8a76844000023 46 Oct 29 23:56 qs -> /opt/rh/nodejs010/root/usr/lib/node_modules/qs move bug to verified.
Run the upgrade script twice and check the apps again, symlinks still points to SCL nodejs libs(/opt/rh/nodejs010/root/usr/lib/node_modules).