Hide Forgot
Description of problem: After creating a JbossEAP-6.0 app, found it was using /etc/alternatives/java_sdk_1.6.0 as its default JAVA_HOME, which should be /etc/alternatives/java_sdk_1.7.0 due to the marker "java7" is existed once the app is created. Version-Release number of selected component (if applicable): http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.2/2013-09-27.1/ openshift-origin-cartridge-jbosseap-2.3.11.3-1.git.0.4d0ae9b.el6op.noarch How reproducible: Always Steps to Reproduce: 1.Create a jbosseap-6.0 app 2.ssh into the app, check the JAVA_HOME env variable [app6-1234.0927-ose.com.cn 5247efce5946d3da75000091]\> echo $JAVA_HOME /etc/alternatives/java_sdk_1.6.0 So it is using jdk-1.6 [app6-1234.0927-ose.com.cn 5247efce5946d3da75000091]\> ps -ef UID PID PPID C STIME TTY TIME CMD 1010 2722 1 0 05:16 ? 00:00:00 /bin/sh /var/lib/openshift/5247efce5946d3da75000091/jbosseap//bin/standalone.sh 1010 2907 2722 25 05:16 ? 00:00:18 /etc/alternatives/java_sdk_1.6.0/bin/java -D[Standalone] -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xmx256m 1010 3862 3834 0 05:17 ? 00:00:00 sshd: 5247efce5946d3da75000091@pts/5 1010 3863 3862 1 05:17 pts/5 00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i 1010 4124 3863 0 05:17 pts/5 00:00:00 ps -ef Actual results: Expected results: It should use /etc/alternatives/java_sdk_1.7.0 Additional info: After git push operation, the $JAVA_HOME would change to /etc/alternatives/java_sdk_1.7.0, and using /etc/alternatives/java_sdk_1.7.0/bin/java
This issue does NOT exist again online env.
Upstream this edge case is handled by the following code: https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-jbosseap/bin/install#L35 https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-jbosseap/bin/util#L6