Project

General

Profile

Actions

Architecture #5760

closed

Architecture #5664: Drop support for Java 6

Add a test on Java version in Rudder init script checking for Java 7

Added by François ARMAND over 9 years ago. Updated almost 9 years ago.

Status:
Released
Priority:
1
Category:
System integration
Target version:
Effort required:
Name check:
Fix check:
Regression:

Description

We have to let the user know if he does not use a supported version of the Java Runtime.

A test + message in the init script should be enought.
Well, modulo that I suspect that no two JVMs report its version in the same way (openjdk and IBM/Oracle flavors in particular).


Subtasks 1 (0 open1 closed)

Bug #5800: 3.0 Rpm server packages not building due to missing 'jetty-init-sles.patch'ReleasedBenoît PECCATTE2014-11-21Actions
Actions #1

Updated by Matthieu CERDA over 9 years ago

  • Status changed from 8 to In progress
  • Assignee set to Matthieu CERDA

Actually, the output format of "java -version" is quite formatted:

IBM JDK 1.6:

java version "1.6.0" 
Java(TM) SE Runtime Environment (build pxa6460sr7-20091215_02(SR7))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr7-20091214_49398 (JIT enabled, AOT enabled)
J9VM - 20091214_049398
JIT  - r9_20091123_13891
GC   - 20091111_AA)
JCL  - 20091202_01

OpenJDK 1.7:

java version "1.7.0_65" 
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-2)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Oracle JRE 1.7:

java version "1.7.0_71" 
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Oracle JRE 1.8:

java version "1.8.0_25" 
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

The output is:

java version "1.X.X" (major, minor, often update level)
Runtime information
VM information
Optionnal things

What we want to look at here is the major JVM version ( we now support only 7 onwards).

A line like this one should do the trick:

# java -version 2>&1 | grep "java version" | sed 's%java version \"[0-9]\.\(.*\)\.[0-9].*\"%\1%'
7

  • Get the version / grep it
  • Extract the second number in the version string (the major version)
  • Return it
Actions #2

Updated by Matthieu CERDA over 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Matthieu CERDA to Benoît PECCATTE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/525
Actions #3

Updated by Matthieu CERDA over 9 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset packages:rudder-packages|commit:154adbda047674bdcf3a56b000dc4571ffa553a2.

Actions #4

Updated by Matthieu CERDA over 9 years ago

Applied in changeset packages:rudder-packages|commit:517345dffb12078f21ed2d86550bcfe1b6f37fac.

Actions #5

Updated by Vincent MEMBRÉ over 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.0.0~beta1 which was release on 01/12/2014.

Actions #6

Updated by Benoît PECCATTE almost 9 years ago

  • Tracker changed from 6 to Architecture
Actions

Also available in: Atom PDF