Bug 1140746

Summary: Cannot get JAVA_HOME make sure supported JRE is installed error while installing rhevm-reports
Product: Red Hat Enterprise Virtualization Manager Reporter: Petr Matyáš <pmatyas>
Component: ovirt-engine-reportsAssignee: Yedidyah Bar David <didi>
Status: CLOSED ERRATA QA Contact: Petr Matyáš <pmatyas>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: bazulay, dfediuck, didi, ecohen, gklein, iheim, lsurette, pmatyas, pstehlik, rbalakri, Rhev-m-bugs, sherold, sradco, yeylon, ylavi
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: vt6 - rhevm-reports-3.5.0-6.el6ev Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 18:18:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1155596, 1157220    
Bug Blocks: 1116851, 1156162    
Attachments:
Description Flags
engine setup log
none
Java-home output
none
Remote reports setup none

Description Petr Matyáš 2014-09-11 15:15:12 UTC
Created attachment 936589 [details]
engine setup log

Description of problem:
When installing remote rhevm-reports I get: [ ERROR ] Failed to execute stage 'Setup validation': Cannot get JAVA_HOME make sure supported JRE is installed

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

How reproducible:
Always on my setup

Steps to Reproduce:
1. yum install rhevm-reports on remote host
2. engine-setup
3.

Actual results:
error

Expected results:
successful setup

Additional info:

Comment 1 Yedidyah Bar David 2014-09-14 14:19:06 UTC
(In reply to Petr Matyáš from comment #0)
> Created attachment 936589 [details]
> engine setup log
> 
> Description of problem:
> When installing remote rhevm-reports I get: [ ERROR ] Failed to execute
> stage 'Setup validation': Cannot get JAVA_HOME make sure supported JRE is
> installed
> 
> Version-Release number of selected component (if applicable):
> 3.5
> 
> How reproducible:
> Always on my setup
> 
> Steps to Reproduce:
> 1. yum install rhevm-reports on remote host

The script /usr/share/ovirt-engine/bin/java-home requires openjdk 1.7.0. This is currently done for the engine, and is inherited by reports. Thus this error. In principle we can loosen this req for reports, if it turns out that it can work with other JREs, not sure we also want to support this.

'yum install rhevm-reports' does install for me java-1.7.0-openjdk . I did not check the exact dependency chain that caused requiring it.

'rhevm-reports' currently requires just 'java'. This can be easily fixed just in case, by requiring in reports specifically java-1.7.0-openjdk as is done in the engine.

Did 'yum install rhevm-reports' install (also) java-1.7.0-openjdk ?

What's the output of 'sh -x /usr/share/ovirt-engine/bin/java-home'?

Comment 3 Yedidyah Bar David 2014-09-15 06:22:24 UTC
(In reply to Yedidyah Bar David from comment #1)
> (In reply to Petr Matyáš from comment #0)
> > Created attachment 936589 [details]
> > engine setup log
> > 
> > Description of problem:
> > When installing remote rhevm-reports I get: [ ERROR ] Failed to execute
> > stage 'Setup validation': Cannot get JAVA_HOME make sure supported JRE is
> > installed
> > 
> > Version-Release number of selected component (if applicable):
> > 3.5
> > 
> > How reproducible:
> > Always on my setup
> > 
> > Steps to Reproduce:
> > 1. yum install rhevm-reports on remote host
> 
> The script /usr/share/ovirt-engine/bin/java-home requires openjdk 1.7.0.
> This is currently done for the engine, and is inherited by reports. Thus
> this error. In principle we can loosen this req for reports, if it turns out
> that it can work with other JREs, not sure we also want to support this.
> 
> 'yum install rhevm-reports' does install for me java-1.7.0-openjdk . I did
> not check the exact dependency chain that caused requiring it.
> 
> 'rhevm-reports' currently requires just 'java'. This can be easily fixed
> just in case, by requiring in reports specifically java-1.7.0-openjdk as is
> done in the engine.

Now verified that 'yum install rhevm-reports' installs java-1.7.0-openjdk even if another 'java' (java-1.5.0) is already installed. Dependency chain is:

rhevm-reports requires jbossas-modules-eap requires apache-commons-collections-eap6 requires java-1.7.0-openjdk

> 
> Did 'yum install rhevm-reports' install (also) java-1.7.0-openjdk ?
> 

So it should have.

> What's the output of 'sh -x /usr/share/ovirt-engine/bin/java-home'?

Indeed?

Comment 4 Petr Matyáš 2014-09-15 08:03:15 UTC
Created attachment 937474 [details]
Java-home output

(In reply to Yedidyah Bar David from comment #3)
> (In reply to Yedidyah Bar David from comment #1)
> > (In reply to Petr Matyáš from comment #0)
> > > Created attachment 936589 [details]
> > > engine setup log
> > > 
> > > Description of problem:
> > > When installing remote rhevm-reports I get: [ ERROR ] Failed to execute
> > > stage 'Setup validation': Cannot get JAVA_HOME make sure supported JRE is
> > > installed
> > > 
> > > Version-Release number of selected component (if applicable):
> > > 3.5
> > > 
> > > How reproducible:
> > > Always on my setup
> > > 
> > > Steps to Reproduce:
> > > 1. yum install rhevm-reports on remote host
> > 
> > The script /usr/share/ovirt-engine/bin/java-home requires openjdk 1.7.0.
> > This is currently done for the engine, and is inherited by reports. Thus
> > this error. In principle we can loosen this req for reports, if it turns out
> > that it can work with other JREs, not sure we also want to support this.
> > 
> > 'yum install rhevm-reports' does install for me java-1.7.0-openjdk . I did
> > not check the exact dependency chain that caused requiring it.
> > 
> > 'rhevm-reports' currently requires just 'java'. This can be easily fixed
> > just in case, by requiring in reports specifically java-1.7.0-openjdk as is
> > done in the engine.
> 
> Now verified that 'yum install rhevm-reports' installs java-1.7.0-openjdk
> even if another 'java' (java-1.5.0) is already installed. Dependency chain
> is:
> 
> rhevm-reports requires jbossas-modules-eap requires
> apache-commons-collections-eap6 requires java-1.7.0-openjdk
> 
> > 
> > Did 'yum install rhevm-reports' install (also) java-1.7.0-openjdk ?
> > 
> 
> So it should have.

No, it did not.

> > What's the output of 'sh -x /usr/share/ovirt-engine/bin/java-home'?
> 
> Indeed?

See attachement

Comment 6 Yedidyah Bar David 2014-09-15 08:14:27 UTC
Very well. I'll add a dependency. Thanks!

Comment 8 Petr Matyáš 2014-10-08 13:20:44 UTC
Created attachment 945002 [details]
Remote reports setup

Still behaves the same on vt5.

Comment 11 errata-xmlrpc 2015-02-11 18:18:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://rhn.redhat.com/errata/RHEA-2015-0176.html