Bug 837638 - [RHEVM Installer] ovirt-engine should use java-1.7
[RHEVM Installer] ovirt-engine should use java-1.7
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Juan Hernández
Pavel Stehlik
integration infra
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-04 09:56 EDT by Kiril Nesenko
Modified: 2015-09-22 09 EDT (History)
9 users (show)

See Also:
Fixed In Version: si12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:01:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
mgoldboi: needinfo+


Attachments (Terms of Use)

  None (edit)
Description Kiril Nesenko 2012-07-04 09:56:27 EDT
Description of problem:
ovirt-engine should use java-1.7 instead of java-1.6.

[root@vm-17-67 yum.repos.d]# lsof -p 11330 | grep /usr/lib/jvm
java    11330 ovirt  txt    REG              253,0    36072 160488 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
java    11330 ovirt  mem    REG              253,0  3534509 160547 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/charsets.jar
java    11330 ovirt  mem    REG              253,0   243115 271086 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/ext/sunpkcs11.jar
java    11330 ovirt  mem    REG              253,0    32400 160528 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/libnio.so
java    11330 ovirt  mem    REG              253,0    86096 160527 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/libnet.so
java    11330 ovirt  mem    REG              253,0   523793 160580 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/jsse.jar


Version-Release number of selected component (if applicable):
si9.1

How reproducible:
Always

Steps to Reproduce:
1. Start ovirt engine service
2. ps -u ovirt; lsof -p <pid_of_engine> | grep /bin/java
3.
  
Actual results:


Expected results:
ovirt-engine should use java-1.7 instead of java-1.6.

Additional info:
Comment 2 Juan Hernández 2012-07-04 10:12:44 EDT
When/if the following change is fixed the engine will refuse to start if the Java virtual machine currently selected with alternatives is not 1.7:

http://gerrit.ovirt.org/#/c/5894

However, this will not fix the issue.

I see two ways to fix it:

1. Change the RPM or the setup tool so that the alternatives command is used to select 1.7 by default. This has then inconvenient that the user can later use the alternatives command to change back to 1.6, maybe for other application, and the engine will refuse to start next time.

2. Change the start script (and the manage-domains and config tools) so that it uses 1.7 regardless of what is configured with alternatives.
Comment 3 Oded Ramraz 2012-07-11 16:39:43 EDT
I lost a lot of time today during si9.1 installation until I realized I'm not using the correct java version:

After I looked at the installation logs I realized that  rhevm-setup fails when it tries to use rhevm-config script: 

2012-07-11 22:57:03::DEBUG::common_utils::309::root:: Executing command --> '/usr/share/ovirt-engine/engine-config/engine-config -s CAEngineKey=/etc/pki/ovirt-engine/private/ca.pem --cver=general -p /usr/share/ovirt-engine/conf/engine-config-install.properties'
2012-07-11 22:57:04::DEBUG::common_utils::335::root:: output =
2012-07-11 22:57:04::DEBUG::common_utils::336::root:: stderr = org.apache.xpath.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: urn:jboss:domain:datasources:1.0

2012-07-11 22:57:04::DEBUG::common_utils::337::root:: retcode = 1
2012-07-11 22:57:04::DEBUG::setup_sequences::62::root:: Traceback (most recent call last):
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run
    function()
  File "/usr/bin/rhevm-setup", line 1060, in _updateVDCOptions
    raise Exception(output_messages.ERR_FAILED_UPD_VDC_OPTIONS%(sys.exc_info()[1]))
Exception: Failed updating configuration parameter: Error: failed updating configuration field CAEngineKey to /etc/pki/ovirt-engine/private/ca.pem

When i tried to run rhevm-config manually I've got the same error:
[root@wheat-vdc ~]# rhevm-config  --list
org.apache.xpath.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: urn:jboss:domain:datasources:1.0

Only after I run the following command i managed to install the setup properly :
alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java

Setting / Raising the severity of this issue.
Comment 4 Juan Hernández 2012-07-12 03:57:29 EDT
Note that the errors that you were getting before running that "alternatives" command where probably caused because you had the IBM J9 virtual machine installed. That is a 1.7 virtual machine, so even if we fix this bug (as described in comment #2) we will still have the same problem.

We can redefine this bug as "ovirt-engine should use openjdk 1.7 regardless of what is installed and configured with alternatives". That or open a new bug.
Comment 5 Juan Hernández 2012-07-12 03:58:38 EDT
Another direction, and maybe another low priority bug, could be to make sure that the engine can work with the IBM J9 java virtual machine (version 1.7, of course).
Comment 6 Juan Hernández 2012-07-13 11:29:52 EDT
The suggested solution for this problem is here:

http://gerrit.ovirt.org/6223
Comment 7 Juan Hernández 2012-07-26 07:02:20 EDT
The change is already merged upstream:

http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=c40592222d4bf9c55bf72248d6ebac4a4efdf4ac

Note You need to log in before you can comment on or make changes to this bug.