Bug 1402447 - rh-maven33 should not pull java-1.7.0-openjdk-devel - RHEL 7 only
Summary: rh-maven33 should not pull java-1.7.0-openjdk-devel - RHEL 7 only
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: rh-maven33
Version: rh-maven33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: alpha
: 2.4
Assignee: Mikolaj Izdebski
QA Contact: Jan Kepler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-07 14:58 UTC by Marek Goldmann
Modified: 2017-04-26 10:16 UTC (History)
12 users (show)

Fixed In Version: rh-maven33-1-18.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1415277 (view as bug list)
Environment:
Last Closed: 2017-04-26 10:16:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
maven dependencies from optional repo (28.79 KB, text/plain)
2016-12-07 14:59 UTC, Marek Goldmann
no flags Details
rh-maven33 dependency list (37.06 KB, text/plain)
2016-12-07 15:00 UTC, Marek Goldmann
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLOUD-1213 0 Major New rh-maven33 from SCL pulls in a lot of dependencies 2019-12-16 13:01:13 UTC
Red Hat Product Errata RHBA-2017:1154 0 normal SHIPPED_LIVE rh-maven33 bug fix update 2017-04-26 14:09:14 UTC

Description Marek Goldmann 2016-12-07 14:58:31 UTC
Description of problem:

When you try to install rh-maven33 package from SCL you will get now big list of dependencies. That, on one side, is a problem on its own, but on the list we can find two JDK (devel) packages: java-1.7.0-openjdk-devel  and java-1.8.0-openjdk-devel (with their dependencies). It looks that the rh-maven33 package has a hard dependency on java-1.7.0-openjdk-devel. This is wrong and it should use latest java-devel package. Currently this is java-1.8.0-openjdk-devel. We would end up with a single (and fresh) JDK.

Having unnecessary JDK installed consumes a lot of space on the disk. This is a problem especially in the Docker world, where each image will weight about 200MB more just because of this wrong dependency.

Another thing to consider are CVEs. If we ship maven from SCL and there will be a CVE affecting JDK7 we would need to respin that Docker image. As you can imagine - we would like to avoid this and cut the dependency tree where possible.

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

rh-maven33-1-17.el7.x86_64

Comment 1 Marek Goldmann 2016-12-07 14:59:34 UTC
Created attachment 1229085 [details]
maven dependencies from optional repo

Attached "regular" maven dependencies on a clean RHEL 7.3 host.

Comment 2 Marek Goldmann 2016-12-07 15:00:15 UTC
Created attachment 1229086 [details]
rh-maven33 dependency list

Attached rh-maven33 dependencies on a clean RHEL 7.3 host.

Comment 3 Marek Goldmann 2016-12-07 15:06:47 UTC
Additional info: this issue affects all xPaaS Docker images:

Red Hat JBoss Enterprise Application Platform (JBoss EAP)
Red Hat JBoss BPM Suite intelligent process server
Red Hat JBoss BRMS real time decision server
Red Hat JBoss Data Virtualization
Red Hat JBoss Fuse Integration Services
Red Hat Single-Sign-On
Red Hat JBoss Data Grid
Red Hat JBoss Web Server (Apache Tomcat)
Red Hat JBoss A-MQ

As well as new images that are in development (there are a few).

Comment 4 Hiram Chirino 2016-12-07 15:15:23 UTC
+1: FIS 2.0 only wants to include Java 8 in it's images, but still use mvn 3.3

Comment 5 Mikolaj Izdebski 2016-12-07 17:30:09 UTC
Switching metapackage requirement to "java-devel-openjdk >= 1:1.7" from "java-1.7.0-openjdk-devel" would fix this issue. We don't want to switch to requiring generic "java-devel" because it is satisfiable by non-OpenJDK, proprietary JVMs (IBM, Oracle).

"java-devel-openjdk" virtual provide is available in RHEL 7.0+. In 7.0 through 7.2 it can by satisfied only by JDK 7, but since RHEL 7.3 both JDK 7 and 8 satisfy it (see bug #1216018). "java-devel-openjdk" is also available since RHEL 6.8, but it can be satisfied only by JDK 7.

Summary:
- can be fixed for RHEL 7, but "pure-JDK-8" installs (no JDK 7 pulled in) would require installing on RHEL 7.3 (or newer).
- can't be fix on RHEL 6 because JDK 8 does not provide "java-devel-openjdk"
- RHEL 6 builds can be switched to use "java-devel-openjdk" once we drop support for RHEL 6.7.

Joe, what are minimal RHEL versions (6.y, 7.y) that need to supported by RHSCL 2.4?

Comment 7 Marek Goldmann 2016-12-08 09:30:25 UTC
Cloud Enablement team is (very) happy with a fix for RHEL 7.3+.

Comment 8 Keith Babo 2016-12-09 15:35:06 UTC
Noting that this issue impacts the upcoming release of Fuse xPaaS images for OpenShift.  We would prefer to use the SCL version of Maven 3.3 in our images, but this issue currently blocks that move.

I expect that this impacts all other xPaaS images as well.  Diogenes can provide more detail there.

Comment 9 Diógenes Rettori 2016-12-09 15:54:23 UTC
The direction is that images should have the minimal dependencies included to properly function. If there is an alternative which considers only one jdk (1.8), then I don't see why, and will not agree with both being included.

Reduced image size is seen as a functional requirement due to the fact that specially in cloud environments the cost associated with shipping and storing bits may be a blocker for some users.


D.

Comment 10 Mikolaj Izdebski 2016-12-09 15:58:27 UTC
rh-maven33 can already be installed with only a single JDK as dependency - java-1.7.0-openjdk-devel. This bug is about allowing it to use any OpenJDK >= 1.7

Comment 11 Diógenes Rettori 2016-12-09 16:04:41 UTC
This has boiled down to an engineering solution more than positioning and PM is about to run out of this technical breath :-)

The positioning is clear: Java 1.8 applications obviously require a 1.8 JDK and the produced image should have the minimal functional components to run such image. So if maven33 can properly function with jdk 1.8, and the app is a 1.8 app, then only jdk 1.8 should be required.

D.

Comment 21 errata-xmlrpc 2017-04-26 10:16:11 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://access.redhat.com/errata/RHBA-2017:1154


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