RHEL 7.x: fab does not manage to install the correct Java version

Bug #1573841 reported by Ato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Invalid
Medium
Raj Reddy
R3.0
Fix Committed
Medium
Raj Reddy
Trunk
Fix Committed
Medium
Raj Reddy

Bug Description

Thanks Nagendra for debugging. Please assign to Raj Reddy.

Provision procedure followed:

fab install_pkg_all_without_openstack:/root/contrail-thirdparty-packages-3.0.0.0-2723~kilo.el7.noarch.rpm
fab install_pkg_all_without_openstack:/root/contrail-install-packages-3.0.0.0-2723~kilo.el7.centos.noarch.rpm

This brings two conflicting Java versions in different repositories:

(1) Version 101 brought by third party packages (RHEL subscriptions):

java-1.7.0-openjdk-headless-1.7.0.101-2.6.6.1.el7_2.x86_64
java-1.7.0-openjdk-1.7.0.101-2.6.6.1.el7_2.x86_64

(2) Version 91 in Contrail repository:

java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64
java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.3.el7.x86_64

Since we don't have yum plugin priority installed, it can't decide repos based on priority. So it gives RHEL repos and contrail repos same priority. By default yum goes for the repo which hosts higher package version, so it went for 101 instead of 91 provided by Contrail.

# java -version
java version "1.7.0_101"
OpenJDK Runtime Environment (rhel-2.6.6.1.el7_2-x86_64 u101-b00)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

Later on, Cassandra requires version 91, but version 101 took priority and Cassandra fails to start, according to its log:

"Cassandra 2.0 and later require Java 7u25 or later."

This bug is opened to request two changes:

(1) Since Contrail provided Cassandra that works only with 91, Contrail should have made sure to install 91. i.e in one of their package there should be a dependency mentioned as java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64 and not just java-1.7.0-openjdk. If Contrail had mentioned a specific version of java, regardless of repo priority, we’d have got the right version of Java. Since Contrail didn't mention that, available higher version of java got installed.. with which our Cassandra is not working.

(2) Contrail should have been made higher priority; i.e we could have installed yum-plugin-priority and added lower priority for RHEL (say priority=100 for rhel repos).. this way even if a higher version of package is available in RHEL, yum would prefer to install from Contrail as Contrail repos has priority=1

Ato (amonge)
information type: Proprietary → Public
Raj Reddy (rajreddy)
tags: added: analytics
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/19882
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/19883
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
Raj Reddy (rajreddy) wrote :

not applicable to 2.2x branches as we are using cassandra 1.2.11 there..

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/19882
Committed: http://github.org/Juniper/contrail-provisioning/commit/b5a8ca3f452ad7e76c479fe4955d5c41c2d86e12
Submitter: Zuul
Branch: R3.0

commit b5a8ca3f452ad7e76c479fe4955d5c41c2d86e12
Author: Raj Reddy <email address hidden>
Date: Tue May 3 22:33:47 2016 -0700

Closes-Bug: #1573841
in cassandra-env.sh, when comparing JVM_PATCH_VERSION, currently string cmp is used
which shows "101" < "25", hence changing the comparison to -lt cmp

Change-Id: I21b920fa4115cdbe1483a3bd2e001ba6c62c6649

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/19883
Committed: http://github.org/Juniper/contrail-provisioning/commit/94dd70d733786a4d81cf2ee6ee8e5efc7f60b9c1
Submitter: Zuul
Branch: master

commit 94dd70d733786a4d81cf2ee6ee8e5efc7f60b9c1
Author: Raj Reddy <email address hidden>
Date: Tue May 3 22:33:47 2016 -0700

Closes-Bug: #1573841
in cassandra-env.sh, when comparing JVM_PATCH_VERSION, currently string cmp is used
which shows "101" < "25", hence changing the comparison to -lt cmp

Change-Id: I21b920fa4115cdbe1483a3bd2e001ba6c62c6649
(cherry picked from commit b5a8ca3f452ad7e76c479fe4955d5c41c2d86e12)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/21433
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/21434
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/21433
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/21434
Committed: http://github.org/Juniper/contrail-puppet/commit/3a919dbe9598a0ed9ef69b4ff6fd2b16fef6f7c7
Submitter: Zuul
Branch: R3.0

commit 3a919dbe9598a0ed9ef69b4ff6fd2b16fef6f7c7
Author: Raj Reddy <email address hidden>
Date: Fri Jun 24 15:14:13 2016 -0700

in cassandra-env.sh, when comparing JVM_PATCH_VERSION, currently string cmp is
used which shows "101" < "25", hence changing the comparison to -lt cmp

Change-Id: If5318b46057cc8aac6ae35f6fa1e32d40d33236d
Closes-Bug: #1573841
(cherry picked from commit 311fb06be152581125d7fb9969e16b2183ac1c92)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/21433
Committed: http://github.org/Juniper/contrail-puppet/commit/5e52b5e66f3866f0b793d8c43271c30887cc28d3
Submitter: Zuul
Branch: master

commit 5e52b5e66f3866f0b793d8c43271c30887cc28d3
Author: Raj Reddy <email address hidden>
Date: Fri Jun 24 15:14:13 2016 -0700

in cassandra-env.sh, when comparing JVM_PATCH_VERSION, currently string cmp is
used which shows "101" < "25", hence changing the comparison to -lt cmp

Change-Id: If5318b46057cc8aac6ae35f6fa1e32d40d33236d
Closes-Bug: #1573841

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.