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

(0.44.0) Add dedicated health port for JITServer #19160

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

mpirvu
Copy link
Contributor

@mpirvu mpirvu commented Mar 15, 2024

Kubernetes can use liveness and readiness probes to check
a pod's health. For a TCP port, the kubelet attempts to open a
socket to the container on the specified port. If a connection
can be established, the container is considered healthy.

The JITServer did not have a dedicated port for health probes;
instead, the main communication port (default 38400) could be
used for this purpose. However, this solution is not ideal
when communication between the client and server is encrypted
with OpenSSL. Starting with OpenSSL 3.0, if one of the participants
closes the connection without notifying the other party, the
OpenSSL library will log error messages like:
"A0F04FE4FE7F0000:error:0A000126:SSL routines:ssl3_read_n:unexpected eof while reading:ssl/record/rec_layer_s3.c:320"
Since the health probes are sent periodically, over time, the log
of the JITServer container could be flooded with such messages.
While the error is benign in nature, these messages are annoying
and can create concerns for end-users.

This commit adds a dedicated health port for JITServer, where
communication is never encrypted. By default, the JITServer will
open a health port and the value of this port is 38600.
The following options were added:
-XX:JITServerHealthProbePort=NNN # change the health port value
-XX:-JITServerHealthProbes # disable the dedicated health port
-XX:+JITServerHealthProbes # enable the dedicated health port

Issue: OpenLiberty/open-liberty#27665

Starting with OpenSSL version 3, the SSL code will generate
SSL_R_UNEXPECTED_EOF_WHILE_READING error messages if the other
party has closed the connection without a proper shutdown
notification.
This commit prevents such messages from being printed on
the console. However, these error messages will stil be printed
to the verbose log if -Xjit:verbose={JITServer} option is
given to the JITServer process.

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
Kubernetes can use liveness and readiness probes to check
a pod's health. For a TCP port, the kubelet attempts to open a
socket to the container on the specified port. If a connection
can be established, the container is considered healthy.

The JITServer did not have a dedicated port for health probes;
instead, the main communication port (default 38400) could be
used for this purpose. However, this solution is not ideal
when communication between the client and server is encrypted
with OpenSSL. Starting with OpenSSL 3.0, if one of the participants
closes the connection without notifying the other party, the
OpenSSL library will log error messages like:
"A0F04FE4FE7F0000:error:0A000126:SSL routines:ssl3_read_n:unexpected eof while reading:ssl/record/rec_layer_s3.c:320"
Since the health probes are sent periodically, over time, the log
of the JITServer container could be flooded with such messages.
While the error is benign in nature, these messages are annoying
and can create concerns for end-users.

This commit adds a dedicated health port for JITServer, where
communication is never encrypted. By default, the JITServer will
open a health port and the value of this port is 38600.
The following options were added:
`-XX:JITServerHealthProbePort=NNN` # change the health port value
`-XX:-JITServerHealthProbes` # disable the dedicated health port
`-XX:+JITServerHealthProbes` # enable the dedicated health port

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
@mpirvu mpirvu requested a review from dsouzai as a code owner March 15, 2024 14:29
@mpirvu
Copy link
Contributor Author

mpirvu commented Mar 15, 2024

This PR chery-picks the commits from #19107 (master branch)

@mpirvu
Copy link
Contributor Author

mpirvu commented Mar 15, 2024

@dsouzai Could you please review/merge this backport PR? Thanks

@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Mar 15, 2024
Copy link
Contributor

@dsouzai dsouzai left a comment

Choose a reason for hiding this comment

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

Patch is identical to #19107

@dsouzai dsouzai merged commit ced76db into eclipse-openj9:v0.44.0-release Mar 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants