Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit cbb893a

Browse files
authored
Merge pull request #41009 from tiborvass/19.03-fix-dns-fallback-regression
[19.03] Fix dns fallback regression Upstream-commit: b85d75e29a3859b4d2b611f47cb1e67b8357ef07 Component: engine
2 parents bca3c9a + e0305a0 commit cbb893a

7 files changed

Lines changed: 55 additions & 18 deletions

File tree

components/engine/Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ pipeline {
275275
sh '''#!/bin/bash
276276
# bash is needed so 'jobs -p' works properly
277277
# it also accepts setting inline envvars for functions without explicitly exporting
278+
set -x
278279
279280
run_tests() {
280281
[ -n "$TESTDEBUG" ] && rm= || rm=--rm;
@@ -324,7 +325,6 @@ pipeline {
324325
# integration-cli second set
325326
TEST_INTEGRATION_DEST=3 CONTAINER_NAME=${CONTAINER_NAME}-3 TEST_SKIP_INTEGRATION=1 TESTFLAGS="-test.run Test(DockerSwarmSuite|DockerDaemonSuite|DockerExternalVolumeSuite)/" run_tests &
326327
327-
set +x
328328
c=0
329329
for job in $(jobs -p); do
330330
wait ${job} || c=$?

components/engine/hack/dockerfile/install/proxy.installer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
44
# updating the binary version, consider updating github.com/docker/libnetwork
55
# in vendor.conf accordingly
6-
: ${LIBNETWORK_COMMIT:=0941c3f409260d5f05cfa6fc68420d8ad45ee483} # bump_19.03 branch
6+
: ${LIBNETWORK_COMMIT:=71d4d82a5ce50453b1121d95544f0a2ae95bef9b} # bump_19.03 branch
77

88
install_proxy() {
99
case "$1" in

components/engine/hack/make/test-integration

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ fi
2222
cleanup_test_suite_binaries
2323
error_on_leaked_containerd_shims
2424

25+
echo exiting test-integration
26+
set -x
2527
exit ${testexit}
2628

2729
) 2>&1 | tee -a "$DEST/test.log"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package network // import "github.com/docker/docker/integration/network"
2+
3+
import (
4+
"context"
5+
"testing"
6+
"time"
7+
8+
"github.com/docker/docker/api/types"
9+
"github.com/docker/docker/integration/internal/container"
10+
"github.com/docker/docker/integration/internal/network"
11+
"github.com/docker/docker/internal/test/daemon"
12+
"gotest.tools/poll"
13+
"gotest.tools/skip"
14+
)
15+
16+
func TestDaemonDNSFallback(t *testing.T) {
17+
skip.If(t, testEnv.IsRemoteDaemon, "cannot start daemon on remote test run")
18+
skip.If(t, testEnv.DaemonInfo.OSType != "linux")
19+
skip.If(t, IsUserNamespace())
20+
21+
d := daemon.New(t)
22+
d.StartWithBusybox(t, "-b", "none", "--dns", "127.127.127.1", "--dns", "8.8.8.8")
23+
defer d.Stop(t)
24+
25+
c := d.NewClientT(t)
26+
ctx := context.Background()
27+
28+
network.CreateNoError(ctx, t, c, "test")
29+
defer c.NetworkRemove(ctx, "test")
30+
31+
cid := container.Run(ctx, t, c, container.WithNetworkMode("test"), container.WithCmd("nslookup", "docker.com"))
32+
defer c.ContainerRemove(ctx, cid, types.ContainerRemoveOptions{Force: true})
33+
34+
poll.WaitOn(t, container.IsSuccessful(ctx, c, cid), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(2*time.Second))
35+
}

components/engine/vendor.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ github.com/gofrs/flock 7f43ea2e6a643ad441fc12d0ecc0
3838
# libnetwork
3939

4040
# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
41-
github.com/docker/libnetwork b9bcf0c3fba9ef8897c9676c5b70ba0345b84b17 # bump_19.03 branch
41+
github.com/docker/libnetwork 71d4d82a5ce50453b1121d95544f0a2ae95bef9b # bump_19.03 branch
4242
github.com/docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f
4343
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
4444
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec

components/engine/vendor/github.com/docker/libnetwork/networkdb/networkdb.pb.go

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/engine/vendor/github.com/docker/libnetwork/resolver.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)