Bug 975708

Summary: java7 markers doestn't work with jbosseap-6.0 and jbossas-7 app
Product: OpenShift Online Reporter: Yan Du <yadu>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmace
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-24 14:58:02 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 Yan Du 2013-06-19 07:58:11 UTC
Description of problem:

create jbossas-7 or jbosseap-6.0 app, and ssh into app check java version, JAVA_HOME=/etc/alternatives/java_sdk_1.6.0 shown.
For jbossews-1.0/2.0, its default version are all java7


Version-Release number of selected component (if applicable):
rhc-1.10.3
INT(devenv_3382)


How reproducible:
Always


Steps to Reproduce:
1. Create an scaling jbossas7  or jbosseap-6.0 app 
$ rhc app create j7 jbossas-7 -s

2. SSH login to the app to check the  JAVA_HOME env
$ rhc ssh app1

$ env|grep JAVA_HOME
3.check the markers in local repo


Actual results:
Step2: 
[j7-111.int.rhcloud.com 51c158b56cec0ee6f7000154]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.6.0

[jboss6-111.int.rhcloud.com 51c15f066cec0e47dd000071]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.6.0

Step3:
[root@Daphne test]# cd j7/.openshift/markers/
[root@Daphne markers]# ls
java7


Expected results:
Step2: should show 
JAVA_HOME=/etc/alternatives/java_sdk_1.7.0


Additional info:
Issue can be reproduced with jbosseap-6.0 app. but java7 works normally with jbossews-1.0 and jbossews-2.0 apps.

[jboss1s-111.int.rhcloud.com 51c160cc6cec0e47dd0000a5]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.7.0

[jboss2s-111.int.rhcloud.com 51c1607103ef64e5f900015f]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.7.0

Comment 2 openshift-github-bot 2013-06-19 14:52:10 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/7c95b6655d15274b5bb6eec3e616e7ac5f42347e
Bug 975708: Fix jboss java7 marker regression

Due to a regression introduced by c3e63de3c7f84cd62df99634dc58371cfd19fd6c, the initial java7
configuration was not being updated properly during setup. Newly created apps using the buggy
cart will default to java6 until the next Git push, at which point java7 will be correctly
enabled.

Fix setup logic to correctly configure java7 for new applications.

Comment 3 Yan Du 2013-06-20 05:40:56 UTC
test on devenv_3389, issue still can be reproduced.

[j7s-aaa.dev.rhcloud.com c8d6c45ad96a11e2980c22000a9704e7]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.6.0

[j6s-111.dev.rhcloud.com 41f18f78d96b11e2980c22000a9704e7]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.6.0

Comment 4 Dan Mace 2013-06-20 14:32:24 UTC
Accidentally regressed this patch with another:

https://github.com/openshift/origin-server/commit/19660b515f1a8a43e7c7a4139d5db7252f4003e7

Fixed (again) in:

https://github.com/openshift/origin-server/pull/2912

Thanks, Yan.

Comment 5 openshift-github-bot 2013-06-20 18:44:52 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/9f746e0ef99dc7455d22d94f2e144d1b25f1de0a
Bug 975708: Fix java7 marker regression

Comment 6 Yan Du 2013-06-21 02:28:03 UTC
verfied on devenv_3396

[j6s-111.dev.rhcloud.com 51c3b87c8651de0727000001]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.7.0

[j7s-111.dev.rhcloud.com 23429168da1911e2831022000a989695]\> env | grep JAVA_HOME
JAVA_HOME=/etc/alternatives/java_sdk_1.7.0

issue has fixed