RFR: JDK-8289146: containers/docker/TestMemoryWithCgroupV1.java fails on linux ppc64le machine with missing Memory and Swap Limit output [v2]
Ioi Lam
iklam at openjdk.org
Mon Jul 4 23:56:22 UTC 2022
On Fri, 1 Jul 2022 15:30:31 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> The issue with asserting a specific error from a container engine is that it might be different from one (`docker`) to the other (`podman`). Another way to address this, could be to pre-assert that on systems where this is happening (no swap), to skip the test. I.e. along the lines of:
>>
>>
>> docker run --memory 100 --memory-swap 200
>>
>> and inside a container have this code:
>>
>>
>> if (metrics.getMemoryAndSwapLimit() == metrics.getMemoryLimit()) {
>> // system doesn't support swap, skip test
>> }
>>
>>
>> Basically akin to: https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java#L283..L284
>
> Looks like changing GRUB_CMDLINE_LINUX_DEFAULT / GRUB_CMDLINE_LINUX in /etc/default/grub file
> by adding cgroup_enable=memory swapaccount=1
> can solve the issue on Linux ppc64le machines (see https://www.suse.com/support/kb/doc/?id=000018585 ).
> I am still not sure why this was not needed on our Linux x86_64 machines.
>
> Without this added setting, 'docker info' showed :
> WARNING: No swap limit support
>
> With this setting, the warning is gone.
I think the error message is not very clear. How about
You may need to add "cgroup_enable=memory swapaccount=1" to the Linux kernel boot parameters.
-------------
PR: https://git.openjdk.org/jdk/pull/9319
More information about the hotspot-runtime-dev
mailing list