Skip to content
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

[#1405] Print warning message instead of failing the bootstrap when using Java prior 8u151 #1406

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Jan 9, 2024

What changes were proposed in this pull request?

Print warning message instead of failing the bootstrap when using Java prior 8u151

Why are the changes needed?

Fix: #1405

Does this PR introduce any user-facing change?

Yes, users who want to use Java prior 8u151 to bootstrap Gravitino just get an warning message instead of failing.

How was this patch tested?

Manually review

@yuqi1129
Copy link
Contributor

yuqi1129 commented Jan 9, 2024

Hi, @pan3793 thank you for your contribution! Can you provide a short message about why we should use warn level message here?

@pan3793
Copy link
Member Author

pan3793 commented Jan 9, 2024

The context indicates Java prior 8u151 has security issues.

@yuqi1129
Copy link
Contributor

yuqi1129 commented Jan 9, 2024

The context indicates Java prior 8u151 has security issues.

Exactly, for this reason, we disable JAVA that before 8u151.

@pan3793
Copy link
Member Author

pan3793 commented Jan 9, 2024

@yuqi1129 what's the principle of Gravitino to handle the security issues? For example, what if the user wants to use an EOL version HMS(has log4shell security issue) combined with Gravitino, Gravitino just rejects the connection?

bin/common.sh Outdated
@@ -59,8 +59,7 @@ function check_java_version() {
# JDK 8u151 version fixed a number of security vulnerabilities and issues to improve system stability and security.
# https://www.oracle.com/java/technologies/javase/8u151-relnotes.html
if [ "$JVM_VERSION" -lt 8 ] || { [ "$JVM_VERSION" -eq 8 ] && [ "${jvmver#*_}" -lt 151 ]; } ; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @pan3793 Thank you for your interest in the Gravitino project.

I think this condition needs split to be 2.

  1. JVM_VERSION must greater than 8, otherwise exit.
  2. If JVM_VERSION less than 8.151, then print warn message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for checking, updated as suggested.

Copy link
Contributor

@yuqi1129 yuqi1129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jerryshao jerryshao closed this Jan 9, 2024
@jerryshao jerryshao reopened this Jan 9, 2024
@jerryshao jerryshao merged commit c62aa87 into apache:main Jan 9, 2024
20 of 26 checks passed
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 this pull request may close these issues.

[Improvement] Print warning message instead of failing the bootstrap when using Java prior 8u151
4 participants