Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1732738

Summary: [RFE] Update engine to use OpenJDK 11 - both build and runtime
Product: [oVirt] ovirt-engine Reporter: Roy Golan <rgolan>
Component: Backend.CoreAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact: Guilherme Santos <gdeolive>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, emarcus, gdeolive, lleistne, mperina, pelauter
Target Milestone: ovirt-4.4.0Keywords: FutureFeature
Target Release: ---Flags: pm-rhel: ovirt-4.4+
pelauter: planning_ack+
mperina: devel_ack+
lleistne: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Modernizing the software stack of ovirt-engine for build and runtime using java-11-openjdk. Java 11 openjdk is the new LTS version from Red Hat.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:02:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1734716    

Description Roy Golan 2019-07-24 09:04:00 UTC
Java 11 openjdk is the new LTS version from Red Hat. Java itself has updated
the pace of releases the LTS every 1.5 years and in order to not stay behind,
plus take advantage of the latest changes its time to move.

Prerequisite:
- os support: openjdk 11 is available on Fedora 30, Centos 7, and RHEL 7, Ubuntu
- EAP 7.2 officially supports java 11. Wildfly 15 onward as well
- IDE and developer tools support are there for quite a while as well.

Caveats:
GWT language level support remains in version 8. Gwt compilation as a result
still needs java binary version 8 to run the gwt-compiler. This means
that build-time dependencies include java-11-devel and java-1.8.0-headless (only java binary needed AFAIR)


Version-Release number of selected component (if applicable):
ovirt 4.4

Expected results:
ovirt-engine and its utilities(config, aaa-jdbc...) are build and run using java-11.


Additional info:
Needs an update or attention to several utilities which
have separate repos but rely on the engine jars:
- ovirt-engine-sdk
- ovirt-engine-api-model (careful with the maven plugin? make sure it stay 8?)
- ovirt-engine-extension-aaa-jdbc 
- vdsm-jsonrpm-java (need to check)

Possibly several more.

Comment 5 Roy Golan 2020-02-13 13:29:12 UTC
Maybe other component ask for it. Please provide the output of this "sudo repoquery --whatrequires java"

Anyhow, the success criteria is that the wildfly will start using java-11 (after the ovirt-engine is compiled using java-11)

Do this to verify after the engine runs:

$ jcmd $(jcmd | grep -i jboss-modules | awk '{print $1}') VM.version
53052:
OpenJDK 64-Bit Server VM version 11.0.6+10
JDK 11.0.6


If you want to be sure the java class where indeed compiled using java-11 then you can do this:

$javap -verbose -bootclasspath /usr/share/ovirt-engine/engine.ear/bll.jar org/ovirt/engine/core/bll/Backend  | grep "major version"
  major version: 55

And version 55 is java-11

Comment 7 Guilherme Santos 2020-02-13 16:04:57 UTC
You are right. In fact, doing some investigation I found out that postgresql-jdbc is the one requiring java-1.8.0.

So, it's verified now with:
ovirt-engine-4.4.0-0.20.master.el7

Steps:
1. Build:
1.1. Check requirements with # yum install ovirt-engine-setup
1.2. Validated that postgresql-jdbc is requiring java-1.8 and core ovirt-engine*-4.4.0-20 or vdsm not: # repoquery --whatrequires java-1.8.0-openjdk-headless.x86_64

2. Runtime:
2.1. With a running engine: # jcmd $(jcmd | grep -i jboss-modules | awk '{print $1}') VM.version
2.2. # javap -verbose -bootclasspath /usr/share/ovirt-engine/engine.ear/bll.jar org/ovirt/engine/core/bll/Backend  | grep "major version"
2.3. # java -v

Results:
1. Only postgresql-jdbc and ovirt-engine-dwh requires java-1.8.0, however ovirt-engine-dwh does only because it itself requires postgresql-jdbc 
2. Only java 11 shown in all situations

Comment 8 Sandro Bonazzola 2020-05-20 20:02:05 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.