Bug 1333168 - Node.js images crash with DEV_MODE=true
Summary: Node.js images crash with DEV_MODE=true
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-04 20:17 UTC by Samuel Padgett
Modified: 2017-08-18 08:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-19 20:13:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1094 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 3.2 security update 2016-05-20 00:12:27 UTC

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


Note You need to log in before you can comment on or make changes to this bug.