Bug 1020521

Summary: mongodb environment variables not showing up on scaled applications
Product: OpenShift Online Reporter: Corey Daley <cdaley>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.xCC: bmeng, cdaley
Target Milestone: ---Keywords: SupportQuestion
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:25:06 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 Corey Daley 2013-10-17 20:02:35 UTC
Description of problem:
mongodb environment variables not showing up on scaled applications
might also be affecting Java applications...

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create php application
2.add mongo db
3. variables show up using ssh, but not via web application

http://phpscale-cdaley.rhcloud.com/phpinfo.php

Actual results:
mongo environment variables are not present

Expected results:
mongo env variables should be present

Additional info:

Comment 1 Jhon Honce 2013-10-17 20:06:29 UTC
Was the application restarted between steps #2 and #3 so the jvm processes could pick up the new environment variables?

Comment 2 Corey Daley 2013-10-17 20:08:54 UTC
I have restarted the PHP application that I am testing on, I will ask the user if they have on their JAVA application.

Comment 3 Jhon Honce 2013-10-17 21:04:08 UTC
The PHP cartridge is implemented to use httpd restart for a better user experience, so a rhc stop/rhc start is required between steps #2 and #3 to pick up the environment variable changes.

The jboss cartridges do a stop/start for their restart, so rhc restart should be sufficient between steps #2 and #3.

Comment 4 Meng Bo 2013-10-21 09:53:40 UTC
Tested on devenv_3921 with jbossas app, after app restart the new added env can be detected by jsp script.