open-nomad/client/lib/cgutil
Seth Hoenig 5138c5b99e
client: do not disable memory swappiness if kernel does not support it (#17625)
* client: do not disable memory swappiness if kernel does not support it

This PR adds a workaround for very old Linux kernels which do not support
the memory swappiness interface file. Normally we write a "0" to the file
to explicitly disable swap. In the case the kernel does not support it,
give libcontainer a nil value so it does not write anything.

Fixes #17448

* client: detect swappiness by writing to the file

* fixup changelog

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>

---------

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-06-22 09:36:31 -05:00
..
cgutil_linux.go client: do not disable memory swappiness if kernel does not support it (#17625) 2023-06-22 09:36:31 -05:00
cgutil_linux_test.go client: do not disable memory swappiness if kernel does not support it (#17625) 2023-06-22 09:36:31 -05:00
cgutil_noop.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
cpuset_manager.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
cpuset_manager_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
cpuset_manager_v1.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
cpuset_manager_v1_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
cpuset_manager_v2.go Fix DevicesSets being removed when cpusets are reloaded with cgroup v2 (#17535) 2023-06-15 09:39:36 -05:00
cpuset_manager_v2_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
editor.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
editor_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
group_killer.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00