From 695b151a18299ade7c70dfe3babc8d77b7f5aba6 Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Mon, 9 Nov 2020 02:48:04 +1100 Subject: [PATCH] Work around small disk on Windows-RS5 CI nodes The free disk space on the Windows RS5 CI nodes appears to be just the right size that the TestBuildWCOWSandboxSize test can generate 21GB of layers, and then a 21GB sandbox inside a container, and then runs out of space while committing the layer. Helpfully, this failure is distinguishable in the logs from a failure when the sandbox is too small, so we can do that. TODO: Revert this if-and-when the Windows-RS5 CI nodes have more free space. Signed-off-by: Paul "TBBle" Hampson --- integration/build/build_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/integration/build/build_test.go b/integration/build/build_test.go index be4ce47fe6..14b4bfa58e 100644 --- a/integration/build/build_test.go +++ b/integration/build/build_test.go @@ -560,7 +560,16 @@ COPY --from=intermediate C:\\stuff C:\\stuff _, err = io.Copy(out, resp.Body) resp.Body.Close() assert.NilError(t, err) - assert.Check(t, is.Contains(out.String(), "Successfully built")) + // The test passes if either: + // - the image build succeeded; or + // - The "COPY --from=intermediate" step ran out of space during re-exec'd writing of the transport layer information to hcsshim's temp directory + // The latter case means we finished the COPY operation, so the sandbox must have been larger than 20GB, which was the test, + // and _then_ ran out of space on the host during `importLayer` in the WindowsFilter graph driver, while committing the layer. + // See https://github.com/moby/moby/pull/41636#issuecomment-723038517 for more details on the operations being done here. + // Specifically, this happens on the Docker Jenkins CI Windows-RS5 build nodes. + // The two parts of the acceptable-failure case are on different lines, so we need two regexp checks. + assert.Check(t, is.Regexp("Successfully built|COPY --from=intermediate", out.String())) + assert.Check(t, is.Regexp("Successfully built|re-exec error: exit status 1: output: write.*daemon\\\\\\\\tmp\\\\\\\\hcs.*bigfile_[1-3].txt: There is not enough space on the disk.", out.String())) } func TestBuildWithEmptyDockerfile(t *testing.T) {