Bug 1395397

Summary: Bug: In-place upgrade installs wrong version of OpenJDK
Product: Red Hat Enterprise Linux 6 Reporter: Terry Bowling <tbowling>
Component: preupgrade-assistant-el6toel7Assignee: Petr Stodulka <pstodulk>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.8CC: jmazanek, ovasik, tcerna
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: preupgrade-assistant-el6toel7-0.6.65-1.el6 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 12:12:32 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: 1293213    
Bug Blocks: 1269194, 1393491    

Description Terry Bowling 2016-11-15 22:05:42 UTC
Description of problem:

When performing an in-place upgrade, undesired version java-1.7.0-openjdk is installed when only java-1.8.0-openjdk should have been.


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

	* RHEL 6.8 + Errata before upgrade:
	java-1.8.0-openjdk-1.8.0.101-3.b13.el6_8.x86_64           
	java-1.8.0-openjdk-headless-1.8.0.101-3.b13.el6_8.x86_64   
	preupgrade-assistant-2.1.6-5.el6.noarch                    
	preupgrade-assistant-el6toel7-0.6.49-1.el6.noarch          
	preupgrade-assistant-el6toel7-data-0.20160505-1.el6.noarch 
	preupgrade-assistant-tools-2.1.6-5.el6.noarch              
	preupgrade-assistant-ui-2.1.6-5.el6.noarch                 
	redhat-upgrade-tool-0.7.43-1.el6.noarch                    
	tzdata-java-2016f-1.el6.noarch                             

	* RHEL 7.2 system after upgrade:
	java-1.7.0-openjdk-1.7.0.101-2.6.6.1.el7_2.x86_64
	java-1.7.0-openjdk-headless-1.7.0.101-2.6.6.1.el7_2.x86_64
	java-1.8.0-openjdk-1.8.0.91-0.b14.el7_2.x86_64
	java-1.8.0-openjdk-headless-1.8.0.91-0.b14.el7_2.x86_64
	javapackages-tools-3.4.1-11.el7.noarch
	python-javapackages-3.4.1-11.el7.noarch
	redhat-upgrade-tool-0.9.3-1.el7.noarch
	tzdata-java-2016d-1.el7.noarch


How reproducible:

This is simple to reproduce on a test vm.


Steps to Reproduce:

1. Install/update RHEL 6.8
2. Install jdk-1.8 packages
3. Perform pre-updgrade steps
4. Unregister from RHSM or disable networking
5. Perform upgrade from RHEL 6.8 - 7.2 from DVD ISO


Actual results:

java-1.7.0-openjdk is installed when only 1.8 should have been installed.


Expected results:

Only java-1.8.0-openjdk should be installed.

Additional info:

This script seems to be doing the work, resulting in the following logs
   /root/preupgrade/postupgrade.d/java-provide/postupgrade.sh
	Aug 10 12:27:49 grf716 upgrade-post[5718]: Running /root/preupgrade/postupgrade.d/java-provide/postupgrade.sh...
	Aug 10 12:27:50 grf716 upgrade-post[5718]: Checksum type 'md5' disabled
	Aug 10 12:27:51 grf716 upgrade-post[5718]: Resolving Dependencies
	Aug 10 12:27:51 grf716 upgrade-post[5718]: --> Running transaction check
	Aug 10 12:27:51 grf716 upgrade-post[5718]: ---> Package java-1.7.0-openjdk.x86_64 1:1.7.0.101-2.6.6.1.el7_2 will be installed
	Aug 10 12:27:51 grf716 upgrade-post[5718]: --> Processing Dependency: java-1.7.0-openjdk-headless = 1:1.7.0.101-2.6.6.1.el7_2 for package: 1:java-1.7.0-openjdk-1.7.0.101-2.6.6.1.el7_2.x86_64

Comment 1 Terry Bowling 2016-11-15 22:11:23 UTC
This BZ was forked off of bz1293213.

This seems to be caused by the RHEL 6.X version has a newer build revision of java-1.7.0-openjdk than RHEL 7.X java-1.8.0-openjdk at the time of the upgrade.

The fact that RHEL 7.3 updates jdk-1.8 to a newer version is NOT a solution.  It only masks that the bug is there and will potentially return in the future as RHEL 6 and RHEL 7 errata updates are not synchronized.

My customer builds telecom appliances based on rhel.  So they have this common RHEL reference platform that they use as the basis for many of their various products.

Customer has plans to update to RHEL 7.3 within 6 months, but cannot incorporate it at this time for their own product update cycle.

Some of their products/applications need jdk-1.7.  So they cannot simply remove jdk-1.7 from their DVD repository to work around this issue.  And they need to know that the root cause of this problem is corrected so that 1.6 does not accidentally get installed.

Some products use only jdk-1.8, so they need to ensure 1.7 is not installed to minimize their update/security audits and to ensure application does not unexpectedly try to use it.  They know to verify the alternatives settings as well, but need 1.7 not installed to be safe. 

The bug is, we can reproduce that if ONLY jdk-1.8 is installed, the upgrade process installs 1.7 as well if no network access is available to pull rhel 7 errata.

This is the issue to focus on and not be distracted by other configuration or java alternatives.  They know all that.  The point is they are using in place upgrade for production telecom systems in the field that do not have or allow easy network access.  These systems are appliances not managed by Satellite or RHSM, so normal capabilities do not apply.

Comment 2 Terry Bowling 2016-11-16 15:50:58 UTC
Note the follow BZs are possibly somewhat related, all involving the upgrades and new i686 (32 bit) version of OpenJDK.

bz1395397 - Bug: In-place upgrade installs wrong version of OpenJDK
bz1388520 - installing java-1.8.0-openjdk.i686 installs incorrect x86_64 dependencies
bz1361609 - Yum changes arch of package if repository becomes out of sync with 32bit OpenJDK

Comment 8 errata-xmlrpc 2017-03-21 12:12:32 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/RHBA-2017-0821.html