Browse code

Unify the frozen images to the multi-arch version

Update and unify the `busybox` images on all arches to the `glibc` multi-arch
version and remove the temp workaround on amd64 which uses the old version
busybox (v1.26) before this PR to bypass the failure of those network related
test cases. Also, this PR will fix all the network related issues with `glibc`
version `busybox` image.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>

Dennis Chen authored on 2018/02/13 13:52:10
Showing 10 changed files
... ...
@@ -168,10 +168,9 @@ RUN echo "source $PWD/hack/make/.integration-test-helpers" >> /etc/bash.bashrc
168 168
 
169 169
 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling
170 170
 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
171
-# TODO: when issue #35963 fixed, we can upgrade the busybox to multi-arch
172 171
 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
173 172
 	buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
174
-	busybox:latest@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f \
173
+	busybox:1.27-glibc@sha256:8c8f261a462eead45ab8e610d3e8f7a1e4fd1cd9bed5bc0a0c386784ab105d8e \
175 174
 	debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
176 175
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
177 176
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
... ...
@@ -144,7 +144,7 @@ RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker
144 144
 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
145 145
 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
146 146
 	buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
147
-	busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
147
+	busybox:1.27-glibc@sha256:8c8f261a462eead45ab8e610d3e8f7a1e4fd1cd9bed5bc0a0c386784ab105d8e \
148 148
 	debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
149 149
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
150 150
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
... ...
@@ -133,7 +133,7 @@ RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker
133 133
 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
134 134
 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
135 135
 	buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
136
-	busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
136
+	busybox:1.27-glibc@sha256:8c8f261a462eead45ab8e610d3e8f7a1e4fd1cd9bed5bc0a0c386784ab105d8e \
137 137
 	debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
138 138
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
139 139
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
... ...
@@ -16,10 +16,10 @@ WORKDIR /go/src/github.com/docker/docker/
16 16
 # Generate frozen images
17 17
 COPY contrib/download-frozen-image-v2.sh contrib/download-frozen-image-v2.sh
18 18
 RUN contrib/download-frozen-image-v2.sh /output/docker-frozen-images \
19
-  buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
20
-  busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
21
-  debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
22
-  hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
19
+	buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
20
+	busybox:1.27-glibc@sha256:8c8f261a462eead45ab8e610d3e8f7a1e4fd1cd9bed5bc0a0c386784ab105d8e \
21
+	debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
22
+	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
23 23
 
24 24
 # Download Docker CLI binary
25 25
 COPY hack/dockerfile hack/dockerfile
... ...
@@ -131,7 +131,7 @@ RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker
131 131
 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
132 132
 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
133 133
 	buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
134
-	busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
134
+	busybox:1.27-glibc@sha256:8c8f261a462eead45ab8e610d3e8f7a1e4fd1cd9bed5bc0a0c386784ab105d8e \
135 135
 	debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
136 136
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
137 137
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
... ...
@@ -125,7 +125,7 @@ RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker
125 125
 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
126 126
 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
127 127
 	buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
128
-	busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
128
+	busybox:1.27-glibc@sha256:8c8f261a462eead45ab8e610d3e8f7a1e4fd1cd9bed5bc0a0c386784ab105d8e \
129 129
 	debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
130 130
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
131 131
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
... ...
@@ -400,13 +400,7 @@ func (s *DockerSuite) TestBuildLastModified(c *check.C) {
400 400
 	defer server.Close()
401 401
 
402 402
 	var out, out2 string
403
-	var args []string
404
-	// Temopray workaround for #35963. Will remove this when that issue fixed
405
-	if runtime.GOARCH == "amd64" {
406
-		args = []string{"run", name, "ls", "-le", "/file"}
407
-	} else {
408
-		args = []string{"run", name, "ls", "-l", "--full-time", "/file"}
409
-	}
403
+	args := []string{"run", name, "ls", "-l", "--full-time", "/file"}
410 404
 
411 405
 	dFmt := `FROM busybox
412 406
 ADD %s/file /`
... ...
@@ -2239,14 +2239,7 @@ func (s *DockerSuite) TestRunSlowStdoutConsumer(c *check.C) {
2239 2239
 	// alternate to /dev/zero and /dev/stdout.
2240 2240
 	testRequires(c, DaemonIsLinux)
2241 2241
 
2242
-	// TODO will remove this if issue #35963 fixed
2243
-	var args []string
2244
-	if runtime.GOARCH == "amd64" {
2245
-		args = []string{"run", "--rm", "busybox", "/bin/sh", "-c", "dd if=/dev/zero of=/dev/stdout bs=1024 count=2000 | catv"}
2246
-	} else {
2247
-		args = []string{"run", "--rm", "busybox", "/bin/sh", "-c", "dd if=/dev/zero of=/dev/stdout bs=1024 count=2000 | cat -v"}
2248
-	}
2249
-
2242
+	args := []string{"run", "--rm", "busybox", "/bin/sh", "-c", "dd if=/dev/zero of=/dev/stdout bs=1024 count=2000 | cat -v"}
2250 2243
 	cont := exec.Command(dockerBinary, args...)
2251 2244
 
2252 2245
 	stdout, err := cont.StdoutPipe()
... ...
@@ -37,6 +37,9 @@ func FrozenImagesLinux(client client.APIClient, images ...string) error {
37 37
 			if img == "hello-world:frozen" {
38 38
 				srcName = "hello-world:latest"
39 39
 			}
40
+			if img == "busybox:1.27-glibc" {
41
+				img = "busybox:latest"
42
+			}
40 43
 			loadImages = append(loadImages, struct{ srcName, destName string }{
41 44
 				srcName:  srcName,
42 45
 				destName: img,
... ...
@@ -9,7 +9,7 @@ import (
9 9
 	"github.com/stretchr/testify/require"
10 10
 )
11 11
 
12
-var frozenImages = []string{"busybox:latest", "hello-world:frozen", "debian:jessie"}
12
+var frozenImages = []string{"busybox:1.27-glibc", "hello-world:frozen", "debian:jessie"}
13 13
 
14 14
 type protectedElements struct {
15 15
 	containers map[string]struct{}