Skip to content

Commit

Permalink
fix(cluster): install openjdk-11 for offline install
Browse files Browse the repository at this point in the history
since we bumped the jre used by scylla-jmx from openjdk-8
to openjdk-11, and we started to check for jre-11. despite
that scylla-jmx still works with jre-8, jre-11 is the
recommended JRE for running scylla-jmx, let's use openjdk-11
for testing offline installation.

please note, scylladb/scylla-jmx#198
was also created to address this issue. but in the long
run, this fix is a better one. as it's always desirable to
use a better supported jre in testing.

Refs scylladb/scylla-jmx#127
Fixes scylladb/scylladb#13414
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
  • Loading branch information
tchaikov committed Apr 9, 2023
1 parent 4215637 commit ba7c866
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2000,18 +2000,18 @@ def offline_install_scylla(self, unified_package, nonroot):
else:
additional_pkgs += ' python2'

# Offline install does't provide openjdk-8, it has to be installed in advance
# Offline install does't provide openjdk-11, it has to be installed in advance
# https://github.com/scylladb/scylla-jmx/issues/127
if self.is_rhel_like():
self.remoter.run(f'sudo yum install -y java-1.8.0-openjdk {additional_pkgs}')
self.remoter.run(f'sudo yum install -y java-11-openjdk-headless {additional_pkgs}')
elif self.distro.is_sles:
raise Exception("Offline install on SLES isn't supported")
elif self.distro.is_debian10 or self.distro.is_debian11:
self.remoter.run(f'sudo apt-get install -y openjdk-11-jre-headless {additional_pkgs}')
else:
self.remoter.run(f'sudo apt-get install -y openjdk-8-jre-headless {additional_pkgs}')
self.remoter.run(f'sudo apt-get install -y openjdk-11-jre-headless {additional_pkgs}')
self.remoter.run('sudo update-java-alternatives --jre-headless '
'-s java-1.8.0-openjdk-${dpkg-architecture -q DEB_BUILD_ARCH}')
'-s java-1.11.0-openjdk-${dpkg-architecture -q DEB_BUILD_ARCH}')

package_version_cmds_v2 = dedent("""
tar -xzO --wildcards -f ./unified_package.tar.gz .relocatable_package_version
Expand Down

0 comments on commit ba7c866

Please sign in to comment.