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)
Small update: 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: http://gerrit.ovirt.org/7549 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: http://gerrit.ovirt.org/5894 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: http://gerrit.ovirt.org/7556
The changes required to fix this bug have been merged upstream: http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=0cffa2f9a628eb87d492716e0b2ead3cd31dade8 http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=0965366fc29920a4ed1e6aa96a38b3846ca9ffba 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'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java + 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java 3 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java * 4 /usr/lib/jvm/java-1.7.0-ibm-1.7.0.0.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: Configuring JVM... 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: JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64 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-1.7.0.3.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.