Bug 1010435 - NodeJS sample app (server.js) contains a misleading /health route
Summary: NodeJS sample app (server.js) contains a misleading /health route
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-20 19:05 UTC by Nam Duong
Modified: 2015-05-14 23:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:30:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Nam Duong 2013-09-20 19:05:51 UTC
Description of problem:
The default nodejs app's server.js contains this route def:
        self.routes['/health'] = function(req, res) {
            res.send('1');
        };

but it's being handled at the proxy so isn't routed to the app's /health handler.  We should remove it as it's confusing for users to try to modify the return value but it's not being reflected on http://$app_url/health

Note that both nodejs-0.6 and nodejs-0.10 contains the same so if we remove/modify this, we need to do so on both cartridge versions.

Comment 1 openshift-github-bot 2013-09-23 21:48:11 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/008a0d5b24c2de63a369a1e282447a1e3ce40bf3
Bug 1010435 - /health provided by proxy

Comment 2 Yan Du 2013-09-24 07:05:57 UTC
test on devnev_3816, test with both nodejs-0.6 and nodejs-0.10 app, return "1" when visit the /health page.

move the bug to verified


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