From b79bba6b68a06870bf6d2138832effbcf6e85d63 Mon Sep 17 00:00:00 2001 From: Rob Murray Date: Wed, 23 Oct 2024 19:27:33 +0100 Subject: [PATCH] Remove feature flag "windows-dns-proxy" Added in 26.1.0, commit 6c68be24a2e6a4dea621b82ab4245e4ed363158e Default changed to true in 27.0.0, commit 33f9a5329a9259bc361f925a09633674878650be No sign of problems so, remove. Signed-off-by: Rob Murray --- daemon/config/config_linux.go | 4 ---- daemon/container_operations_windows.go | 6 ------ daemon/info_windows.go | 4 ++++ libnetwork/network_windows.go | 3 --- libnetwork/sandbox.go | 1 - libnetwork/sandbox_options_windows.go | 7 ------- libnetwork/sandbox_windows.go | 5 ----- 7 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 libnetwork/sandbox_options_windows.go diff --git a/daemon/config/config_linux.go b/daemon/config/config_linux.go index 35c463794e..a12177af1a 100644 --- a/daemon/config/config_linux.go +++ b/daemon/config/config_linux.go @@ -208,10 +208,6 @@ func (conf *Config) ValidatePlatformConfig() error { return errors.Wrap(err, "invalid fixed-cidr-v6") } - if _, ok := conf.Features["windows-dns-proxy"]; ok { - return errors.New("feature option 'windows-dns-proxy' is only available on Windows") - } - return verifyDefaultCgroupNsMode(conf.CgroupNamespaceMode) } diff --git a/daemon/container_operations_windows.go b/daemon/container_operations_windows.go index 787bfc668a..9dc5f66e09 100644 --- a/daemon/container_operations_windows.go +++ b/daemon/container_operations_windows.go @@ -164,12 +164,6 @@ func serviceDiscoveryOnDefaultNetwork() bool { } func buildSandboxPlatformOptions(ctr *container.Container, cfg *config.Config, sboxOptions *[]libnetwork.SandboxOption) error { - // By default, the Windows internal resolver forwards requests to external - // resolvers - but forwarding can be disabled using feature flag - // "windows-dns-proxy":false. - if doproxy, exists := cfg.Features["windows-dns-proxy"]; exists && !doproxy { - *sboxOptions = append(*sboxOptions, libnetwork.OptionDNSNoProxy()) - } return nil } diff --git a/daemon/info_windows.go b/daemon/info_windows.go index 1897aa494b..7b8918475b 100644 --- a/daemon/info_windows.go +++ b/daemon/info_windows.go @@ -11,6 +11,10 @@ import ( // fillPlatformInfo fills the platform related info. func (daemon *Daemon) fillPlatformInfo(ctx context.Context, v *system.Info, sysInfo *sysinfo.SysInfo, cfg *configStore) error { + if _, ok := cfg.Features["windows-dns-proxy"]; ok { + v.Warnings = append(v.Warnings, ` +WARNING: Feature flag "windows-dns-proxy" has been removed, forwarding to external DNS resolvers is enabled.`) + } return nil } diff --git a/libnetwork/network_windows.go b/libnetwork/network_windows.go index 6ddfe8373b..108f078107 100644 --- a/libnetwork/network_windows.go +++ b/libnetwork/network_windows.go @@ -103,9 +103,6 @@ func addEpToResolver( epIface *EndpointInterface, resolvers []*Resolver, ) error { - if config.dnsNoProxy { - return nil - } hnsEndpoints, err := hcsshim.HNSListEndpointRequest() if err != nil { return nil diff --git a/libnetwork/sandbox.go b/libnetwork/sandbox.go index fe47f3c825..97aa728578 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/sandbox.go @@ -92,7 +92,6 @@ type resolvConfPathConfig struct { } type containerConfig struct { - containerConfigOS //nolint:nolintlint,unused // only populated on windows hostsPathConfig resolvConfPathConfig generic map[string]interface{} diff --git a/libnetwork/sandbox_options_windows.go b/libnetwork/sandbox_options_windows.go deleted file mode 100644 index 8022e400d2..0000000000 --- a/libnetwork/sandbox_options_windows.go +++ /dev/null @@ -1,7 +0,0 @@ -package libnetwork - -func OptionDNSNoProxy() SandboxOption { - return func(sb *Sandbox) { - sb.config.dnsNoProxy = true - } -} diff --git a/libnetwork/sandbox_windows.go b/libnetwork/sandbox_windows.go index 7b57971254..51daada8aa 100644 --- a/libnetwork/sandbox_windows.go +++ b/libnetwork/sandbox_windows.go @@ -6,11 +6,6 @@ import ( "github.com/docker/docker/libnetwork/osl" ) -// Windows-specific container configuration flags. -type containerConfigOS struct { - dnsNoProxy bool -} - func releaseOSSboxResources(*osl.Namespace, *Endpoint) {} func (sb *Sandbox) updateGateway(*Endpoint) error {