daemon: un-export internal functions, and some minor refactoring#41656
daemon: un-export internal functions, and some minor refactoring#41656AkihiroSuda merged 5 commits intomoby:masterfrom
Conversation
daemon/config/config.go
Outdated
There was a problem hiding this comment.
Not a new in this PR, but v1 shim is no longer used by default. Can we add a godoc about that?
There was a problem hiding this comment.
Hmm.. was about to update the description, but looks like it's still used if containerd is started as child process;
moby/cmd/dockerd/daemon_unix.go
Lines 64 to 73 in 48da116
Should that be updated to containerd-shim-runc-v2 ?
There was a problem hiding this comment.
Or should it be removed altogether? I see that if the containerd-config looks like this;
[plugins]
[plugins.linux]
shim = "containerd-shim"
runtime = "runc"
runtime_root = "/var/lib/docker/runc"
no_shim = false
shim_debug = trueContainers are still started with containerd-shim-runc-v2, so looks like the configuration is not needed anymore?
I see containerd also sets containerd-shim and runc as defaults; https://github.com/containerd/containerd/blob/9b4967bd6b77e4a6bb4c36c86b4e3a6daaead6d4/runtime/v1/linux/runtime.go#L71-L82
So perhaps it should be removed, or is there still a path where this would be used?
This utility was added after 19.03, and is only used in the daemon code itself, so we can un-export it, until there's an external use for it. Also updated the description, because the runc code already copied it from coreos/go-systemd, so better to describe the actual source. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
it's only used internally, so no need to export Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
it's only used internally, so no need to export Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
4405365 to
bf07c06
Compare
|
@AkihiroSuda @cpuguy83 PTAL |
|
Good to go? 😅 |
daemon: un-export IsRunningSystemd()
This utility was added after 19.03, and is only used in the daemon code
itself, so we can un-export it, until there's an external use for it.
Also updated the description, because the runc code already copied it
from coreos/go-systemd, so better to describe the actual source.
daemon: use sync.Once for systemd detection
daemon: un-export VerifyCgroupDriver()
daemon: un-export ModifyRootKeyLimit()
daemon: move DefaultShimBinary, DefaultRuntimeBinary to config package