Repository navigation
CLOUDSTACK-9780: Fixed the default JAVA_HOME value to be Java8 if not set - #1938
Conversation
|
@rhtyd, @wido, @nvazquez, @rafaelweingartner please review... This fixes an issue with #1888. |
|
Thanks @swill! LGTM |
|
@swill, I have a question (actually two) :) If “JAVA_HOME” is not set, or if “JAVA_HOME” content does not exist, we check if there is a java installation. I have a doubt about this last path we are checking. Is this path “/usr/lib/jvm/jre-1.8.0” default (some sort of standard)? I ask because (at least on Debian, or at least the Debian I am using) whenever I install using “aptitude”, the java versions were added to folders following the pattern: “/usr/lib/jvm/java--openjdk-/jre/”. Of course, this is for OpenJDK installed with “aptitude”. Are we assuming that the user when installing manually (e.g. installing the JRE from Oracle) will put Java JRE files in a folder like “/usr/lib/jvm/jre-1.8.0”? This will also only work for Java JRE 1.8.0, if users install Java JRE 1.8.1 and use the version as the name of the folder, this would not work. Of course, all can be fixed by setting the JAVA_HOME. Would not it be better to cause an exception and stop the deployment with a message saying that we require the “JAVA_HOME” to be set? Then, it feels that we will be consistent; otherwise, I can imagine a user complaining that she/he has installed the Java 8 (1.8.x; where x > 0), but still ACS does not work. What do you think? |
|
So the short answer is that I ran into this issue when I upgraded and since I don't install to that path either, but for some reason it was populated in my environment. Can you do an Here is the result from my CentOS 6.8 setup. The way I see it right now, people WILL run into this issue. This at least reduces the number of people who have problems. |
|
Ok, got it. my output: Anyways, I understand that you are following the current pattern. So, we may let this problem (if it turns out to be a problem) for our future selves. If people start having problems when updating to java JRE version bigger than 1.8.0. Having said that, LGTM |
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-479 |
|
@swill I agree with @rafaelweingartner . I suggest to use the following setting ? |
|
If someone use ubuntu 16.04/14.04, could you test #1916 as well ? |
|
@blueorangutan test ubuntu kvm-ubuntu |
|
@borisstoyanov a Trillian-Jenkins test job (ubuntu mgmt + kvm-ubuntu) has been kicked to run smoke tests |
|
@ustcweizhou I am not comfortable with that change. If more than one java is installed and Java 8 is not the default, then this will incorrectly set java_home (if I understand correctly). I will leave my pr as is. It solves the problem the same way it was done in the past. If you would like to introduce a new approach and test it against the different distributions, please open a new PR with your new implementation. |
|
@swill in my point of view, users should set java8 as default if they have multiple versions (we can add it in user guide). |
|
@borisstoyanov can you post ubuntu test results? |
|
Will Stevens on dev@cloudstack.apache.org replies: |
|
@karuturi unfortunately we've hit an issue with the ubuntu images, didn't manage to deploy the Trillian env.. |
|
good point @swill. Thanks @borisstoyanov. |
CLOUDSTACK-9780: Fixed the default JAVA_HOME value to be Java8 if not setNow that PR-1888 is merged, Java8 is required. Unfortunately, the file pushed to `/etc/cloudstack/management/classpath.conf` on ACS install will default the version to Java7 instead of Java8 if JAVA_HOME is unset. This fix sets the default to Java8 if JAVA_HOME is not set. * pr/1938: Fixed the default JAVA_HOME value to be Java8 if not set Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
…o '4.20.0.0-scclouds' Adição do campo de busca para _rules_ das _roles_ Closes apache#1938 See merge request scclouds/scclouds!882

Now that PR-1888 is merged, Java8 is required. Unfortunately, the file pushed to
/etc/cloudstack/management/classpath.confon ACS install will default the version to Java7 instead of Java8 if JAVA_HOME is unset. This fix sets the default to Java8 if JAVA_HOME is not set.