Do not enable kmem on RHEL7 kernels#38128
Conversation
|
CI failure in janky (probably unrelated but I haven't seen it before) |
|
Should we update the Makefile and Dockerfile to set the correct build-flag for the 3.10 kernels? |
I think this belongs to packaging -- specifically, when we create packages for RHEL7. I was looking at it (in https://github.com/docker/docker-ce-packaging) but got lost :( Sure we can do it here instead. |
Yes, definitely also is needed in packaging. My train of thought here was that;
|
Changes: opencontainers/runc@a00bf01...9f1e944 Signed-off-by: Kir Kolyshkin <[email protected]>
In case we're running on RHEL7 kernel, which has non-working and broken kernel memory controller, add 'nokmem' build tag so that runc never enables kmem accounting. For more info, see the following runc commit: opencontainers/runc@6a2c1559684 This behavior can be overriden by having `RUNC_NOKMEM` environment variable set (e.g. to empty value to disable setting nokmem). Signed-off-by: Kir Kolyshkin <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #38128 +/- ##
=========================================
Coverage ? 36.11%
=========================================
Files ? 610
Lines ? 45216
Branches ? 0
=========================================
Hits ? 16331
Misses ? 26646
Partials ? 2239 |
|
@thaJeztah makes sense. Please see added commit. |
|
Let's merge this; looks good to me, but @tianon if there's anything to improve/address in the installer script, let me know 🤗 |
This applies the fix developed in moby/moby#38128 to CentOS 7 RPMs, which are currently built without the correct flag. This avoids kernel memory being leaked as described in https://bugzilla.redhat.com/show_bug.cgi?id=1507149
1. bump runc
Changes: opencontainers/runc@a00bf01...9f1e944
This is primarily to pull in opencontainers/runc#1921
2. runc.installer: add nokmem build tag for rhel7 kernel
In case we're running on RHEL7 kernel, which has non-working
and broken kernel memory controller, add 'nokmem' build tag
so that runc never enables kmem accounting.
For more info, see the following runc commit:
opencontainers/runc@6a2c1559684
This behavior can be overriden by having
RUNC_NOKMEMenvironmentvariable set (e.g. to empty value to disable setting nokmem).