Red Hat Bugzilla – Bug 834436
installer should verify the java version used
Last modified: 2015-09-22 09:09 EDT
need to make sure we only work with a single version of java.
plan is for openjdk 7.
but in any case, installer needs to verify we use the version we expect.
note: this isn't about rpm being deployed only, since java allows co-existence of several versions.
need to make sure our code for engine, etl and the various utilities is actually being run on java 1.7
I'd argue that the service startup script should perform this check as well - especially as it is so easy to change default JDK.
I wonder if regardless of the default selected, we can use whatever we support.
i hope/expect we'll only support openjdk 7 for 3.1.
but good point on should we verify this post installation as well (it would probably work with any java version, we just want to certify only one)
service is currently using Java7 explicitly, so there's no chance of any error (service wise)
Itamar- is it enough? or we should take care of external utilities as well?
We can add an alternatives check in the setup, but I'm not sure it's enough
yes, some may be sensitive to it (manage domains utility relying on kerberos code/behavior, etc.)
so to KISS, we should use V7 always.
The following change implements the checking of the Java version during setup:
The engine-setup tool will find a suitable version of the Java virtual machine (OpenJDK 7 at the moment) and write its location to the service configuration file.
The service will also perform a check of the version prior to running, as things can change after engine-setup runs:
Still need to implement the check in the tools, so this bug won't be completely fixed even if these two changes are merged.
The following change makes sure that the tools and the notifier use the JVM version selected by engine-setup:
The changes required to fix this bug have been merged upstream:
Note that change 5894 (check of the JVM during startup) is no longer required as the check is already performed during installation, so it has been abandoned.
Juan, how can I verify this bug please?
Before starting the installation make sure that you have alternative JDKs installed, in particular please test with IBM JDK:
yum install java-1.7.0-ibm-devel
Also make sure it is selected as the default using the alternatives command:
[root@r6 ~]# alternatives --config java
There are 4 programs which provide 'java'.
+ 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
* 4 /usr/lib/jvm/java-1.7.0-ibm-18.104.22.168.0.x86_64/jre/bin/java
Enter to keep the current selection[+], or type selection number: 4
During the execution of engine-setup the following message should be displayed:
Once installation is finished the /etc/sysconfig/ovirt-engine file should contain the JAVA_HOME and it should point to the installation directory of OpenJDK:
Make sure the ovirt-engine service is started and check that it is using OpenJDK even if the IBM JDK is selected with alternatives:
# service ovirt-engine start
# ps -u ovirt
PID TTY TIME CMD
2395 ? 00:00:15 java
# pmap 2395 | grep jre
0000000000400000 4K r-x-- /usr/lib/jvm/java-1.7.0-openjdk-22.214.171.124.x86_64/jre/bin/java
Check also that the engine-config and engine-manage-domains tools work correctly.
Ilanit and I have performed exactly the above, moving to VERIFIED.