Open syuu1228 opened 4 months ago
This is part of https://github.com/scylladb/scylladb/pull/17969, need to merge first.
also, in scylla-jmx,
select-java
actually serves for use cases
- if we are not installing the package, it selects the java executable at runtime, see https://github.com/scylladb/scylla-jmx/blob/3328a229610daac8198a4133b496a9d7cb1de469/scripts/scylla-jmx#L134 .
- if we are installing the package using
install.sh
,install.sh
is responsible for detecting the runtime environment for the java applications. so it also checks for the available java runtimes.in this change, we only address the second use case, where we are installing scylla-tools using
install.sh
, but what about the first use case? please note, the existing check is performed by, which just check if the
java
fulfills the needs, it does not pick a java runtime. so if user actually has openjdk-11 installed, but he/she doe not point/usr/bin/java
to it, or export$JAVA
so that it points to one of the supported java runtime,cassandra.in.sh
fails.
We need some code to detect Java on scylla-tools's install.sh, since we are dropping it from unified installer. But, as you descripbed, Java detection method between select-java and cassandra.in.sh are different, I think we should not use select-java here. So I pushed new code to detect Java just like cassandra.in.sh, and dropped select-java.
Since we dropped Java check from unified installer and jmx, we need to do it on scylla-tools.
Related https://github.com/scylladb/scylladb/pull/17969