I have copy pasted the block from atlassian upstream into my own forked puppet-jira:
j_ver=`echo "$($JAVA_HOME/bin/java -version 2>&1)" | grep "version" | awk '{ print substr($3, 2, length($3)-2); }'`
IFS='.' read -a j_ver_parts <<< "$j_ver"
if [[ ${j_ver_parts[0]} = 17 ]]; then
JVM_OPENS=$(cat $PRGDIR/java-opens.txt)
JAVA_OPTS="$JVM_OPENS $JAVA_OPTS"
fi
Potentially we may want to instead use variables etc in puppet to implement this instead as it will be less of a hack than atlassian did. I'll whip up a PR if I have time.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Regular jira class puppet definition.
What are you seeing
Atlassian requires special JVM parameters for Java 17 support as per: https://jira.atlassian.com/browse/JRASERVER-76224
Currently the setenv.sh does not set these, the result is that java 17 does not work at all with jira 9.5 +.
What behaviour did you expect instead
The following block should be included in setenv.sh in order to support java 17, if jre17/jfk17 is being used:
JVM_OPENS=$(cat $PRGDIR/java-opens.txt) JAVA_OPTS="$JVM_OPENS $JAVA_OPTS"
(before export JAVA_OPTS)
Output log
Any additional information you'd like to impart
I have copy pasted the block from atlassian upstream into my own forked puppet-jira:
Potentially we may want to instead use variables etc in puppet to implement this instead as it will be less of a hack than atlassian did. I'll whip up a PR if I have time.