Bug 1333168

Summary: Node.js images crash with DEV_MODE=true
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: ImageStreamsAssignee: Ben Parees <bparees>
Status: CLOSED ERRATA QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: aos-bugs, haowang, jokerman, mmccomas, wzheng
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: 2016-05-19 20:13:52 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:

Description Samuel Padgett 2016-05-04 20:17:25 UTC
I might have configured this incorrectly, but I can't get dev mode to work as described here:

https://docs.openshift.org/latest/using_images/s2i_images/nodejs.html#configuration

I added the DEV_MODE env var to the sourceStrategy in the build config:

  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: ImageStreamTag
        namespace: openshift
        name: 'nodejs:0.10'
      env:
        -
          name: DEV_MODE
          value: 'true'

The container crash loops after deployment. I see the following errors in the log:

/usr/libexec/s2i/run: line 9: exec: nodemon: not found

Maybe I need nodemon in package.json? (This isn't in the instructions, though.)

Comment 1 Wang Haoran 2016-05-05 03:25:20 UTC
seems for the rhel image , we should use nodemon.js in the run script.

Comment 2 Ben Parees 2016-05-06 15:17:25 UTC
moving to enterprise since it's an issue w/ the rhel image that online just happens to use.

Comment 3 Ben Parees 2016-05-06 16:31:25 UTC
fix:
https://github.com/openshift/s2i-nodejs/pull/97

Comment 5 Wang Haoran 2016-05-16 02:30:01 UTC
Failed due to this bug https://bugzilla.redhat.com/show_bug.cgi?id=1336263

Comment 6 Ben Parees 2016-05-17 16:45:56 UTC
should be verifiable when https://bugzilla.redhat.com/show_bug.cgi?id=1336263 goes to on_qa.

Comment 7 Wang Haoran 2016-05-19 02:48:12 UTC
verified with :
openshift3/nodejs-010-rhel7     latest              ce2a4369aff3        28 hours ago
[haoran@cheetah cucushift]$ oc logs nodejs-ex-2-rcjlb
Environment: 
	DEV_MODE=true
	NODE_ENV=development
	DEBUG_PORT=5858
Launching via nodemon...
[nodemon] 1.8.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node --debug=5858 server.js`
debugger listening on port 5858
Server running on http://0.0.0.0:8080

Ben , feel free to move to ON_QA

Comment 9 errata-xmlrpc 2016-05-19 20:13:52 UTC
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://access.redhat.com/errata/RHSA-2016:1094