moby/daemon
Sebastiaan van Stijn f5209d23a8
daemon: add nolint-comments for deprecated kernel-memory options, hooks
This adds some nolint-comments for the deprecated kernel-memory options; we
deprecated these, but they could technically still be accepted by alternative
runtimes.

    daemon/daemon_unix.go:108:3: SA1019: memory.Kernel is deprecated: kernel-memory limits are not supported in cgroups v2, and were obsoleted in [kernel v5.4]. This field should no longer be used, as it may be ignored by runtimes. (staticcheck)
            memory.Kernel = &config.KernelMemory
            ^
    daemon/update_linux.go:63:3: SA1019: memory.Kernel is deprecated: kernel-memory limits are not supported in cgroups v2, and were obsoleted in [kernel v5.4]. This field should no longer be used, as it may be ignored by runtimes. (staticcheck)
            memory.Kernel = &resources.KernelMemory
            ^

Prestart hooks are deprecated, and more granular hooks should be used instead.
CreateRuntime are the closest equivalent, and executed in the same locations
as Prestart-hooks, but depending on what these hooks do, possibly one of the
other hooks could be used instead (such as CreateContainer or StartContainer).
As these hooks are still supported, this patch adds nolint comments, but adds
some TODOs to consider migrating to something else;

    daemon/nvidia_linux.go:86:2: SA1019: s.Hooks.Prestart is deprecated: use [Hooks.CreateRuntime], [Hooks.CreateContainer], and [Hooks.StartContainer] instead, which allow more granular hook control during the create and start phase. (staticcheck)
        s.Hooks.Prestart = append(s.Hooks.Prestart, specs.Hook{
        ^

    daemon/oci_linux.go:76:5: SA1019: s.Hooks.Prestart is deprecated: use [Hooks.CreateRuntime], [Hooks.CreateContainer], and [Hooks.StartContainer] instead, which allow more granular hook control during the create and start phase. (staticcheck)
                    s.Hooks.Prestart = append(s.Hooks.Prestart, specs.Hook{
                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-15 17:55:47 +02:00
..
cluster api: normalize the default NetworkMode 2024-03-28 12:34:23 +01:00
config api: add MinSupportedAPIVersion const 2024-02-06 18:44:44 +01:00
containerd c8d/list: Fix diffIDs being outputted instead of chainIDs 2024-03-20 11:17:50 +01:00
events migrate to new github.com/distribution/reference module 2023-09-05 12:09:26 +02:00
graphdriver daemon: overlay2: remove world writable permission from the lower file 2024-03-05 14:25:50 +01:00
images Merge pull request #47555 from rumpl/feat-c8d-prom 2024-03-13 17:35:14 +01:00
initlayer remove some remaining pre-go1.17 build-tags 2023-08-24 17:51:07 +02:00
links daemon/links: use strings.Cut() 2022-12-21 11:09:01 +01:00
listeners migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
logger Fix cases where we are wrapping a nil error 2024-04-01 21:30:43 +00:00
names Add canonical import comment 2018-02-05 16:51:57 -05:00
network Only restore a configured MAC addr on restart. 2024-02-01 09:55:54 +00:00
snapshotter c8d/mount: Use ref-counted mounter by default 2024-01-18 15:38:51 +01:00
stats Make one-shot stats faster 2023-09-27 14:10:23 +08:00
testdata Remove libtrust dep from api 2017-09-06 12:05:19 -04:00
apparmor_default.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
apparmor_default_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
archive.go api: remove POST /containers/{id}/copy endpoint (api < v1.23) 2024-02-06 18:44:44 +01:00
archive_tarcopyoptions.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
archive_tarcopyoptions_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
archive_tarcopyoptions_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_unix.go api: remove POST /containers/{id}/copy endpoint (api < v1.23) 2024-02-06 18:44:44 +01:00
archive_windows.go api/types/events: define "Action" type and consts 2023-08-29 00:38:08 +02:00
attach.go container: internalize InitAttachContext 2023-11-30 15:26:53 +01:00
auth.go daemon: use types/registry.AuthConfig 2022-07-29 23:05:18 +02:00
cdi.go Update container-device-interface to v0.6.2 2023-11-04 01:00:19 +01:00
changes.go c8d: add support for docker diff 2023-03-30 10:29:07 +01:00
checkpoint.go api/types/events: define "Action" type and consts 2023-08-29 00:38:08 +02:00
cluster.go Fix libnetwork imports 2021-06-01 21:51:23 +00:00
commit.go migrate to new github.com/distribution/reference module 2023-09-05 12:09:26 +02:00
configs.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
configs_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
configs_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
configs_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
container.go api/pre-1.44: Default ReadOnlyNonRecursive to true 2024-02-26 11:37:30 +01:00
container_linux.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
container_operations.go daemon: don't call NetworkMode.IsDefault() 2024-03-28 12:35:47 +01:00
container_operations_test.go libnet: remove Endpoint.myAliases 2023-12-19 10:20:38 +01:00
container_operations_unix.go Refactor 'resolv.conf' generation. 2024-02-06 22:26:12 +00:00
container_operations_windows.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
container_unix_test.go remove more direct uses of logrus 2023-09-15 20:12:27 +02:00
container_windows.go daemon: fix capitalization of some functions 2020-04-14 17:22:19 +02:00
containerfs_linux.go volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
content.go daemon: configureLocalContentStore: return concrete types 2023-07-18 14:18:42 +02:00
create.go api/pre-1.44: Default ReadOnlyNonRecursive to true 2024-02-26 11:37:30 +01:00
create_unix.go volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
create_windows.go volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
daemon.go api: normalize the default NetworkMode 2024-03-28 12:34:23 +01:00
daemon_linux.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
daemon_linux_test.go fix duplicate words (dupwords) 2024-03-07 10:57:03 +01:00
daemon_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
daemon_unix.go daemon: add nolint-comments for deprecated kernel-memory options, hooks 2024-04-15 17:55:47 +02:00
daemon_unix_test.go api: remove code for adjusting CPU shares (api < v1.19) 2024-02-06 18:44:33 +01:00
daemon_unsupported.go daemon: read-copy-update the daemon config 2023-06-01 14:45:24 -04:00
daemon_windows.go api: remove code for adjusting CPU shares (api < v1.19) 2024-02-06 18:44:33 +01:00
daemon_windows_test.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
debugtrap_unix.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
debugtrap_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
debugtrap_windows.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
delete.go api/types: move ContainerCreateConfig, ContainerRmConfig to api/types/backend 2023-12-05 16:41:36 +01:00
delete_test.go api/types: move ContainerCreateConfig, ContainerRmConfig to api/types/backend 2023-12-05 16:41:36 +01:00
dependency.go Bump swarmkit to v2 2022-04-21 17:33:07 -04:00
devices.go Remove need to set Capabilities for cdi driver 2023-05-16 17:07:58 +02:00
disk_usage.go api/types: move image options to api/types/image 2024-01-24 00:10:33 +01:00
errors.go daemon: cleanupContainer: don't fail if container is already stopped 2023-08-23 15:47:43 +02:00
errors_test.go daemon: cleanupContainer: don't fail if container is already stopped 2023-08-23 15:47:43 +02:00
events.go Plumb context through info endpoint 2023-11-10 20:09:25 +00:00
events_test.go api/types/events: define "Action" type and consts 2023-08-29 00:38:08 +02:00
exec.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
exec_linux.go Cleanup duplicate imports 2023-10-26 00:10:23 +01:00
exec_linux_test.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
exec_windows.go daemon: read-copy-update the daemon config 2023-06-01 14:45:24 -04:00
export.go api/types/events: define "Action" type and consts 2023-08-29 00:38:08 +02:00
health.go daemon: stop checkpointing health probes to disk 2024-01-16 14:09:40 -05:00
health_test.go remove more direct uses of logrus 2023-09-15 20:12:27 +02:00
id.go Add otel support 2023-09-07 18:38:19 +00:00
image_service.go api/types: move image options to api/types/image 2024-01-24 00:10:33 +01:00
info.go Be more explicit about non-TLS TCP access deprecation 2024-03-13 14:22:10 +01:00
info_unix.go (*Daemon).fillRootlessVersion: fix nil panic 2024-01-17 00:50:53 +09:00
info_unix_test.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
info_windows.go Plumb context through info endpoint 2023-11-10 20:09:25 +00:00
inspect.go daemon: don't call NetworkMode.IsDefault() 2024-03-28 12:35:47 +01:00
inspect_linux.go api: remove code for ContainerInspect on api < v1.20 2024-02-06 18:44:43 +01:00
inspect_test.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
inspect_windows.go api: remove code for ContainerInspect on api < v1.20 2024-02-06 18:44:43 +01:00
keys.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
keys_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
kill.go fix duplicate words (dupwords) 2024-03-07 10:57:03 +01:00
licensing.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
licensing_test.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
links.go Add canonical import comment 2018-02-05 16:51:57 -05:00
list.go api/types/image: move GetImageOpts to api/types/backend 2024-01-22 20:45:21 +01:00
list_test.go api/types: move ContainerListOptions to api/types/container 2023-10-12 11:29:24 +02:00
list_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
list_windows.go pkg/containerfs: alias ContainerFS to string 2022-09-23 16:56:52 -04:00
logdrivers_linux.go logger: remove logentries driver 2023-12-12 22:51:23 +01:00
logdrivers_windows.go logger: remove logentries driver 2023-12-12 22:51:23 +01:00
logs.go api/types: move ContainerLogsOptions to api/types/container 2023-10-12 11:30:12 +02:00
logs_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
metrics.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
metrics_unix.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
metrics_unsupported.go daemon: read-copy-update the daemon config 2023-06-01 14:45:24 -04:00
monitor.go volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
mounts.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
names.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
network.go Don't enforce new validation rules for existing networks 2024-02-09 11:56:46 +00:00
network_windows.go libnetwork: remove Network interface 2023-07-22 11:56:41 +02:00
nvidia_linux.go daemon: add nolint-comments for deprecated kernel-memory options, hooks 2024-04-15 17:55:47 +02:00
oci_linux.go daemon: add nolint-comments for deprecated kernel-memory options, hooks 2024-04-15 17:55:47 +02:00
oci_linux_test.go libnetwork: share a single datastore with drivers 2024-01-31 21:08:34 -05:00
oci_opts.go daemon: ensure OCI options play nicely together 2023-06-06 13:10:05 -04:00
oci_utils.go daemon: ensure OCI options play nicely together 2023-06-06 13:10:05 -04:00
oci_windows.go api/types/image: move GetImageOpts to api/types/backend 2024-01-22 20:45:21 +01:00
oci_windows_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
pause.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
prune.go api/types: move ContainerCreateConfig, ContainerRmConfig to api/types/backend 2023-12-05 16:41:36 +01:00
reload.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
reload_test.go libnetwork: share a single datastore with drivers 2024-01-31 21:08:34 -05:00
reload_unix.go daemon: consolidate runtimes config validation 2023-06-01 14:45:25 -04:00
reload_windows.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
rename.go daemon: rename: don't reload endpoint from datastore 2024-01-23 22:53:21 +01:00
resize.go api/types/events: define "Action" type and consts 2023-08-29 00:38:08 +02:00
resize_test.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
restart.go daemon: daemon.containerRestart: don't cancel restart on context cancel 2023-10-24 12:56:45 +02:00
runtime_unix.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
runtime_unix_test.go vendor: containerd v1.7.12, and switch to dario.cat/mergo v1.0.0 2024-01-12 18:09:24 +01:00
runtime_windows.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
seccomp_linux.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
seccomp_linux_test.go container: split security options to a SecurityOptions struct 2023-04-29 00:03:37 +02:00
seccomp_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
secrets.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
secrets_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
secrets_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
start.go api: remove handling of HostConfig on POST /containers/{id}/start (api < v1.24) 2024-02-06 18:44:44 +01:00
start_linux.go Restore the SetKey prestart hook. 2024-03-25 19:35:55 +00:00
start_notlinux.go daemon: set libnetwork sandbox key w/o OCI hook 2024-01-19 20:23:12 +00:00
start_unix.go daemon: consolidate runtimes config validation 2023-06-01 14:45:25 -04:00
start_windows.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
stats.go api: remove code for container stats on api < v1.21 2024-02-06 18:44:43 +01:00
stats_collector.go pkg/sysinfo: move MemInfo and ReadMemInfo to a separate package 2023-03-15 17:52:45 +01:00
stats_unix.go Make one-shot stats faster 2023-09-27 14:10:23 +08:00
stats_windows.go Make one-shot stats faster 2023-09-27 14:10:23 +08:00
stop.go daemon: daemon.containerStop: use context.WithoutCancel 2023-10-20 17:44:30 +02:00
top_unix.go api/types/events: define "Action" type and consts 2023-08-29 00:38:08 +02:00
top_unix_test.go daemon: use string-literals for easier grep'ing 2023-07-05 12:27:00 +02:00
top_windows.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
unpause.go migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
update.go api/types/events: define "Action" type and consts 2023-08-29 00:38:08 +02:00
update_linux.go daemon: add nolint-comments for deprecated kernel-memory options, hooks 2024-04-15 17:55:47 +02:00
update_linux_test.go daemon: stop setting container resources to zero 2023-06-06 12:13:05 -04:00
update_windows.go Windows: Experimental: Allow containerd for runtime 2019-03-12 18:41:55 -07:00
volumes.go api/pre-1.44: Default ReadOnlyNonRecursive to true 2024-02-26 11:37:30 +01:00
volumes_linux.go Fix the several typos detected by github.com/client9/misspell 2018-08-09 00:45:00 +09:00
volumes_linux_test.go daemon: rename variables that collide with imported package names 2020-04-14 17:22:23 +02:00
volumes_unit_test.go volume/mounts: remove "containerOS" argument from NewParser (LCOW code) 2021-07-02 13:51:55 +02:00
volumes_unix.go volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
volumes_windows.go volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
wait.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
workdir.go Add ADD/COPY --chown flag support to Windows 2018-08-13 21:59:11 -07:00