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
Update JVM_IsUseContainerSupport #18185
Update JVM_IsUseContainerSupport #18185
Conversation
i suppose the main risk is that these changes could enable downstream code to execute outside of containers whereas previously it would have only executed in a container context. Presumably that environment is also where most of our testing runs, but I think we should run tests cross-platform before we consider to merge it especially given where we are in the release cycle. But all that's irrelevant for the backport question unless @pshipton and @tajila agree it's worthwhile to consider at this point. |
It looks like the usage of |
The cgroups Java API associated with |
jenkins test sanity.openjdk,extended.openjdk amac jdk11 |
jenkins test sanity.openjdk,extended.openjdk xlinux jdk11 |
Currently, in comparison to the RI, OpenJ9 shows a different output for -XshowSettings:system outside a container because our JVM_IsUseContainerSupport implementation differs from the RI. This PR matches the latest RI behaviour for JVM_IsUseContainerSupport. The RI returns TRUE from JVM_IsUseContainerSupport IFF -XX:+UseContainerSupport is specified. This option is enabled by default. Currently, we return TRUE from JVM_IsUseContainerSupport if -XX:+UseContainerSupport is specified && we are inside a container. The return value of JVM_IsUseContainerSupport determines the output of -XshowSettings:system. If JVM_IsUseContainerSupport returns FALSE, -XshowSettings:system has the below output: Operating System Metrics: No metrics available for this platform If JVM_IsUseContainerSupport returns TRUE, -XshowSettings:system has the below output: Operating System Metrics: Provider: cgroupv2 Effective CPU Count: 8 CPU Period: -1 CPU Quota: -1 CPU Shares: -1 List of Processors: N/A List of Effective Processors: N/A List of Memory Nodes: N/A List of Available Memory Nodes: N/A Memory Limit: Unlimited Memory Soft Limit: 0.00K Memory & Swap Limit: Unlimited Maximum Processes Limit: Unlimited Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
a25da71
to
b26198d
Compare
Old PR builds:
|
Pls go ahead with the backport. |
Currently, in comparison to the RI, OpenJ9 shows a different output for
-XshowSettings:system outside a container because our
JVM_IsUseContainerSupport implementation differs from the RI.
This PR matches the latest RI behaviour for JVM_IsUseContainerSupport.
The RI returns TRUE from JVM_IsUseContainerSupport IFF
-XX:+UseContainerSupport is specified. This option is enabled by
default.
Currently, we return TRUE from JVM_IsUseContainerSupport if
-XX:+UseContainerSupport is specified && we are inside a container.
The return value of JVM_IsUseContainerSupport determines the output
of -XshowSettings:system.
If JVM_IsUseContainerSupport returns FALSE, -XshowSettings:system has
the below output:
If JVM_IsUseContainerSupport returns TRUE, -XshowSettings:system has
the below output:
Signed-off-by: Babneet Singh sbabneet@ca.ibm.com