open-nomad/drivers/docker
Seth Hoenig 52aaf86f52 raw_exec: make raw exec driver work with cgroups v2
This PR adds support for the raw_exec driver on systems with only cgroups v2.

The raw exec driver is able to use cgroups to manage processes. This happens
only on Linux, when exec_driver is enabled, and the no_cgroups option is not
set. The driver uses the freezer controller to freeze processes of a task,
issue a sigkill, then unfreeze. Previously the implementation assumed cgroups
v1, and now it also supports cgroups v2.

There is a bit of refactoring in this PR, but the fundamental design remains
the same.

Closes #12351 #12348
2022-04-04 16:11:38 -05:00
..
cmd cleanup driver eventor goroutines 2020-05-26 11:04:04 -04:00
docklog ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
test-resources/docker drivers/docker: add support for STOPSIGNAL 2021-05-05 10:27:58 -07:00
util client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
config.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
config_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
coordinator.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
coordinator_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
driver.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_darwin.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_darwin_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_default.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_linux.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_linux_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_pre09.go Apply some suggested fixes from staticcheck (#9598) 2020-12-10 07:29:18 -08:00
driver_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_unix_test.go raw_exec: make raw exec driver work with cgroups v2 2022-04-04 16:11:38 -05:00
driver_windows.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
driver_windows_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
fingerprint.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
fingerprint_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
handle.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
network.go allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
network_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
ports.go drivers/docker: support mapping multiple host ports to the same container port 2021-02-02 22:54:23 -05:00
ports_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
progress.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
progress_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
reconcile_cpuset.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
reconcile_cpuset_noop.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
reconcile_cpuset_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
reconcile_dangling.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
reconcile_dangling_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
state.go docker: started work on porting docker driver to new plugin framework 2018-11-19 22:59:15 -05:00
stats.go cleanup: prevent leaks from time.After 2022-02-02 14:32:26 -06:00
stats_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
utils.go fix: load token in docker auth config 2021-07-22 22:27:29 +02:00
utils_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
utils_unix_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
utils_windows_test.go client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
win32_volume_parse.go cleanup: purge github.com/pkg/errors 2022-04-01 19:24:02 -05:00