Skip to content

JVM_OPENS not set for JIRA Java 17 support #412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
valentino-aguiar-gsa opened this issue Jan 10, 2024 · 0 comments · Fixed by #413
Closed

JVM_OPENS not set for JIRA Java 17 support #412

valentino-aguiar-gsa opened this issue Jan 10, 2024 · 0 comments · Fixed by #413

Comments

@valentino-aguiar-gsa
Copy link
Contributor

valentino-aguiar-gsa commented Jan 10, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.28.0
  • Distribution: Rocky 9.3
  • Module version: Latest

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant