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

[18.09 backport] Jenkinsfile, CI, and Makefile updates#338

Merged
andrewhsu merged 27 commits intodocker-archive:18.09from
thaJeztah:18.09_backport_jenkinsfile
Sep 23, 2019
Merged

[18.09 backport] Jenkinsfile, CI, and Makefile updates#338
andrewhsu merged 27 commits intodocker-archive:18.09from
thaJeztah:18.09_backport_jenkinsfile

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 28, 2019

Backports of:

Conflicts in the Dockerfile at various points, due to rootless kit not being in this branch, but they were not too difficult to resolve; pay extra attention though if you see anything out of order.

# https://github.com/moby/moby/pull/37726 hack/make.ps1: know where we failed
git cherry-pick -s -S -x d2788cb2f01f9f2baeef3d3ac705133282dcd27c

# https://github.com/moby/moby/pull/38430 Fix double slash after $PREFIX
git cherry-pick -s -S -x 5d5adcd898f0b29a3ffe2820001288dd3a324374

# https://github.com/moby/moby/pull/38658 Use 17.06 stable channel for CLI used in CI
git cherry-pick -s -S -x 468eb93e5acc809248405102db32460fe7efed08

# https://github.com/moby/moby/pull/38786 fix hack/dockerfile/install/containerd.installer lf statement's operator
git cherry-pick -s -S -x 5e77399b92a5f03ea45ec1326e5c5b8d771a3d49

# https://github.com/moby/moby/pull/39010 Support cross-compile for arm
git cherry-pick -s -S -x 61a3285864d3f1b489f48f765b61b2c7bd300372

# https://github.com/moby/moby/pull/39069 Fix DOCKER_CROSS being overwritten
git cherry-pick -s -S -x 934b3a3841fb47649ccf93257ed909cbd0f1caed

# https://github.com/moby/moby/pull/39090 Add support for setting GOARM in cross target
git cherry-pick -s -S -x fbb001d1f98fef6cc1b38b58350c7cd0c2828461

# https://github.com/moby/moby/pull/39091 Make CC toolchains available for other targets
git cherry-pick -s -S -x f067a0acaa98824b5efa3b6e2c370f6e81013a35

https://github.com/moby/moby/pull/39312 Set DOCKER_BINDDIR mount options from env
git cherry-pick -s -S -x b1e6536ceb8a4eeaecee6d9bcf2ef37d3a25d127

# https://github.com/moby/moby/pull/39508 Fix "Removing bundles/" not actually removing bundles
git cherry-pick -s -S -x f75f34249bd55b449dd4e0be08624fe0dcf50b63

# https://github.com/moby/moby/pull/39548 Dockerfile: use GO_VERSION build-arg for overriding Go version
git cherry-pick -s -S -x a55753877016eaa3ed577774c11c2428f95ac433

# https://github.com/moby/moby/pull/39580 added hack/ci/master as entry point for master codeline checks
git cherry-pick -s -S -x aac6e62209b1b7fe22717ca9c4714c8fc74c29e8

# https://github.com/moby/moby/pull/39657 Add support for setting a test filter
git cherry-pick -s -S -x 13064b155eb439a79adcf8f160ecf2b76f805bd4

# https://github.com/moby/moby/pull/39684 Improve integration test detector
git cherry-pick -s -S -x e2b24490e45fb1e024c0b1594bf978573b91271c

# https://github.com/moby/moby/pull/39698 make.ps1: Run-IntegrationTests(): set working directory for test suite
git cherry-pick -s -S -x 6ae46aeabf056180067dd6af8d5d8588d6075c31

# https://github.com/moby/moby/pull/39635 Dockerfile: use --no-install-recommends for all stages
git cherry-pick -s -S -x b0835dd0889b00e231edf78b25fc929a6b148b05

# https://github.com/moby/moby/pull/39720 Dockerfile: use DEBIAN_FRONTEND=noninteractive
git cherry-pick -s -S -x 2ff9ac4de5fbd4c6afc215373362ea65f4a44fbc

# https://github.com/moby/moby/pull/39721 Jenkinsfile: run DCO check before everything else
git cherry-pick -s -S -x d6f7909c7639105c93e0670999e6f0536e9f6fff

# https://github.com/moby/moby/pull/39717 Dockerfile: add python3-wheel back again (for yamllint)
git cherry-pick -s -S -x ad70bf6866ac40753d0f629269169b4be74e2ad0

# https://github.com/moby/moby/pull/39747 Jenkinsfile: Use new windows labels
git cherry-pick -s -S -x ca3e230b7749d02dd6019392eeffcd0e0d5d2c16

# https://github.com/moby/moby/pull/39795 hack/make.sh remove "latest" symlink
git cherry-pick -s -S -x dde1fd78c7c9a142a4099917198e69d88d34d088

# https://github.com/moby/moby/pull/39797 Replace libprotobuf-c0-dev with libprotobuf-c-dev
git cherry-pick -s -S -x d185ca78ec53a448d8be0aaa4ade4824f9e4f928

# https://github.com/moby/moby/pull/39790 integration: fix some linting issues, and don't fail build on artifact uploads
git cherry-pick -s -S -x 917b0dcd3df383e841b7e0e4a7f3c174959544b7 \
	8b65e058bedba80cd50eae0c211c71976b7be88f \
	a76ff632a4a833851ef36726c9e9bfb5e7dbed39

# https://github.com/moby/moby/pull/39808 Jenkinsfile: fix invalid expression in bundles script
git cherry-pick -s -S -x ca1e7a3b4a112d496fed16c548af8d585f52be92

# https://github.com/moby/moby/pull/39830 windows.ps1: fix leaked NdisAdapters not being cleaned up on RS1
git cherry-pick -s -S -x 156ad54fb707ed8b03a1084a841ef5602198799a

@thaJeztah thaJeztah added this to the 18.09.9 milestone Aug 28, 2019
@thaJeztah thaJeztah force-pushed the 18.09_backport_jenkinsfile branch from 51ed975 to 3dcd669 Compare August 28, 2019 21:47
@thaJeztah thaJeztah modified the milestones: 18.09.9, 18.09.10 Aug 30, 2019
kolyshkin and others added 6 commits August 31, 2019 12:47
In case of an exception, it makes great sense to print out some
information telling where exactly it happened.

_.InvocationInfo.PositionMessage gives script name, line number,
character position and (depending on the PS version) highlights
the part where error has happened.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit d2788cb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
I noticed this in the build output;

```
16:05:07 [100%] Built target tini-static
16:05:07 + mkdir -p /build/
16:05:07 + cp tini-static /build//docker-init
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5d5adcd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Update to the latest patch release of 17.06.2. This
keeps the same API requirements.

This also enables pre-built binaries for armhf instead
of compiling from source.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 468eb93)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Rong Gao <gaoronggood@163.com>
(cherry picked from commit 5e77399)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Pretty much cross-compile doesn't work because  of this:

> profiles/seccomp/seccomp.go:13:2: build constraints exclude all Go files in /go/src/github.com/docker/docker/vendor/github.com/seccomp/libseccomp-golang

This changes adds a new Dockerfile target for cross compilation with the
neccesary arch specific libseccomp packages and CC toolchains.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 61a3285)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Not exactly sure why, but this line;

   build: DOCKER_CROSS ?= false

Always overwrote `DOCKER_CROSS` when running `make cross`.
Perhaps because it is set in `cross: DOCKER_CROSS := true`,
and in a different scope? May also be dependent on the
version of `make` in use.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 934b3a3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 18.09_backport_jenkinsfile branch 2 times, most recently from 672970a to 7504eea Compare August 31, 2019 11:01
cpuguy83 and others added 18 commits August 31, 2019 14:35
This adds to the existing format of `<GOOS>/<GOARCH>` to allow for
`<GOOS>/arm/v<GOARM>`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit fbb001d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This cross-compiling other binaries simpler.
It would be nice if the cross Makefile target built all the required
bins, but at least this is a first step.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit f067a0a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Adds `DOCKER_BINDDIR_MOUNT_OPTS` to easily tweak the BINDDIR mount
options... primarily adding so I can control the caching mode for
osxfs because compiling takes > 1min for me with the default and < 30s
with both `cached` and `delegated`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit b1e6536)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Before:

Running `ls -la bundles/` before, and after removing:

    ls -la bundles/
    total 16
    drwxr-xr-x  7 root root  224 Jul 12 12:25 .
    drwxr-xr-x  1 root root 4096 Jul 12 12:30 ..
    drwxr-xr-x  2 root root   64 Jul 12 10:00 dynbinary
    drwxr-xr-x  6 root root  192 Jul 12 12:25 dynbinary-daemon
    lrwxrwxrwx  1 root root    1 Jul 12 12:25 latest -> .
    drwxr-xr-x 92 root root 2944 Jul 12 12:29 test-integration

    Removing bundles/

    ls -la bundles/
    total 16
    drwxr-xr-x  7 root root  224 Jul 12 12:25 .
    drwxr-xr-x  1 root root 4096 Jul 12 12:30 ..
    drwxr-xr-x  2 root root   64 Jul 12 10:00 dynbinary
    drwxr-xr-x  6 root root  192 Jul 12 12:25 dynbinary-daemon
    lrwxrwxrwx  1 root root    1 Jul 12 12:25 latest -> .
    drwxr-xr-x 92 root root 2944 Jul 12 12:29 test-integration

After:

Running `ls -la bundles/` before, and after removing:

    ls -la bundles/
    total 16
    drwxr-xr-x  7 root root  224 Jul 12 12:25 .
    drwxr-xr-x  1 root root 4096 Jul 12 12:30 ..
    drwxr-xr-x  2 root root   64 Jul 12 10:00 dynbinary
    drwxr-xr-x  6 root root  192 Jul 12 12:25 dynbinary-daemon
    lrwxrwxrwx  1 root root    1 Jul 12 12:25 latest -> .
    drwxr-xr-x 92 root root 2944 Jul 12 12:29 test-integration

    Removing bundles/

    ls -la bundles/
    total 4
    drwxr-xr-x 2 root root   64 Jul 12 12:25 .
    drwxr-xr-x 1 root root 4096 Jul 12 12:30 ..

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f75f342)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit a557538)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit aac6e62)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is basically taking some stuff that make a custom shell function
for.
This takes a test filter, builds the appropriate TESTFLAGS, and sets the
integration API test dirs that match the given filter to avoid building
all test dirs.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 13064b1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The "new test" detector in test-integration-flaky was a bit flaky since
it would detect function signatures that are not new tests.

In addition, the test calls `return` outside of a function which is not
allowed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e2b2449)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This function changed to the correct working directory before starting the tests
(which is the same as on Linux), however the `ProcessStartInfo` process does
not inherit this working directory, which caused Windows tests to be running
with a different working directory as Linux (causing files used in tests to not
be found).

From the documentation; https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.workingdirectory?view=netframework-4.8

> When `UseShellExecute` is `true`, the fully qualified name of the directory that contains
> the process to be started. When the `UseShellExecute` property is `false`, the working
> directory for the process to be started. The default is an empty string (`""`).

This patch sets the `ProcessStartInfo.WorkingDirectory` to the correct working
directory before starting the process.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6ae46ae)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b0835dd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Using a build-arg so that we don't have to specify it for each
`apt-get install`, and to preserve that the `DEBIAN_FRONTEND` is
preserved in the image itself (which changes the default behavior,
and can be surprising if the image is run interactively).`

With this patch, some (harmless, but possibly confusing) errors
are no longer printed during build, for example:

```patch
 Unpacking libgcc1:armhf (1:6.3.0-18+deb9u1) ...
 Selecting previously unselected package libc6:armhf.
 Preparing to unpack .../04-libc6_2.24-11+deb9u4_armhf.deb ...
-debconf: unable to initialize frontend: Dialog
-debconf: (TERM is not set, so the dialog frontend is not usable.)
-debconf: falling back to frontend: Readline
 Unpacking libc6:armhf (2.24-11+deb9u4) ...
 Selecting previously unselected package libgcc1:arm64.
 Preparing to unpack .../05-libgcc1_1%3a6.3.0-18+deb9u1_arm64.deb ...
 Unpacking libgcc1:arm64 (1:6.3.0-18+deb9u1) ...
 Selecting previously unselected package libc6:arm64.
 Preparing to unpack .../06-libc6_2.24-11+deb9u4_arm64.deb ...
-debconf: unable to initialize frontend: Dialog
-debconf: (TERM is not set, so the dialog frontend is not usable.)
-debconf: falling back to frontend: Readline

```

Looks like some output is now also printed on stdout instead of stderr

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2ff9ac4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This will run the DCO check in a lightweight alpine container, before
running other stages, and before building the development image/container
(which can take a long time).

A Jenkins parameter was added to optionally skip the DCO check (skip_dco)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d6f7909)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Although the Dockerfile builds without it, adding wheel back
should save some time

```
00:45:28  moby#14 10.70 Building wheels for collected packages: pathspec, pyyaml
00:45:28  moby#14 10.70   Running setup.py bdist_wheel for pathspec: started
00:45:28  moby#14 10.88   Running setup.py bdist_wheel for pathspec: finished with status 'error'
00:45:28  moby#14 10.88   Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mbotnxes/pathspec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpg9pl4u6kpip-wheel- --python-tag cp35:
00:45:28  moby#14 10.88   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
00:45:28  moby#14 10.88      or: -c --help [cmd1 cmd2 ...]
00:45:28  moby#14 10.88      or: -c --help-commands
00:45:28  moby#14 10.88      or: -c cmd --help
00:45:28  moby#14 10.88
00:45:28  moby#14 10.88   error: invalid command 'bdist_wheel'
00:45:28  moby#14 10.88
00:45:28  moby#14 10.88   ----------------------------------------
00:45:28  moby#14 10.88   Failed building wheel for pathspec
00:45:28  moby#14 10.88   Running setup.py clean for pathspec
00:45:28  moby#14 11.05   Running setup.py bdist_wheel for pyyaml: started
00:45:28  moby#14 11.25   Running setup.py bdist_wheel for pyyaml: finished with status 'error'
00:45:28  moby#14 11.25   Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mbotnxes/pyyaml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpyci_xi0bpip-wheel- --python-tag cp35:
00:45:28  moby#14 11.25   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
00:45:28  moby#14 11.25      or: -c --help [cmd1 cmd2 ...]
00:45:28  moby#14 11.25      or: -c --help-commands
00:45:28  moby#14 11.25      or: -c cmd --help
00:45:28  moby#14 11.25
00:45:28  moby#14 11.25   error: invalid command 'bdist_wheel'
00:45:28  moby#14 11.25
00:45:28  moby#14 11.25   ----------------------------------------
00:45:28  moby#14 11.25   Failed building wheel for pyyaml
00:45:28  moby#14 11.25   Running setup.py clean for pyyaml
00:45:28  moby#14 11.44 Failed to build pathspec pyyaml
00:45:28  moby#14 11.45 Installing collected packages: pathspec, pyyaml, yamllint
00:45:28  moby#14 11.45   Running setup.py install for pathspec: started
00:45:29  moby#14 11.73     Running setup.py install for pathspec: finished with status 'done'
00:45:29  moby#14 11.73   Running setup.py install for pyyaml: started
00:45:29  moby#14 12.05     Running setup.py install for pyyaml: finished with status 'done'
00:45:29  moby#14 12.12 Successfully installed pathspec-0.5.9 pyyaml-5.1.2 yamllint-1.16.0
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ad70bf6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
(cherry picked from commit ca3e230)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This symlink was added in d427534,
to allow finding the path to the latest built binary, because at the time,
those paths were prefixed with the version or commit (e.g. `bundles/1.5.0-dev`).

Commit bac2447 removed the version-prefix in
paths, but kept the old symlink for backward compatiblity. However, many
things were moved since then (e.g. paths were renamed to `binary-daemon`,
and various other changes). With the symlink pointing to the symlink's parent
directory, following the symlink may result into an infinite recursion,
which can happen if scripts using wildcards / globbing to find files.

With this symlink no longer serving a real purpose, we can probably safely
remove this symlink now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit dde1fd7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The `libprotobuf-c0-dev` virtual package is no longer available
in Debian Buster, but is provided by `libprotobuf-c-dev`, which
is available.

https://packages.debian.org/stretch/libprotobuf-c0-dev

> Virtual Package: libprotobuf-c0-dev
>
> This is a virtual package. See the Debian policy for a definition of virtual packages.
>
> Packages providing libprotobuf-c0-dev
> libprotobuf-c-dev
> Protocol Buffers C static library and headers (protobuf-c)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d185ca7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 917b0dc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8b65e05)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Failing to archive the bundles should not mark the build as failed.
This can happen if a build is terminated early, or if (to be implemented)
an optional build-stage is skipped / failed;

```
2019-08-24T10:53:09.354Z] + bundleName=janky
[2019-08-24T10:53:09.354Z] + echo Creating janky-bundles.tar.gz
[2019-08-24T10:53:09.354Z] Creating janky-bundles.tar.gz
[2019-08-24T10:53:09.354Z] + xargs tar -czf janky-bundles.tar.gz
[2019-08-24T10:53:09.354Z] + find bundles -path */root/*overlay2 -prune -o -type f ( -name *-report.json -o -name *.log -o -name *.prof -o -name *-report.xml ) -print
[2019-08-24T10:53:09.354Z] find: bundles: No such file or directory
[2019-08-24T10:53:09.354Z] tar: Cowardly refusing to create an empty archive
[2019-08-24T10:53:09.354Z] Try 'tar --help' or 'tar --usage' for more information.
Error when executing always post condition:
hudson.AbortException: script returned exit code 123
	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:569)
	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:515)
	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:461)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a76ff63)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This was introduced in a76ff63:

    + find bundles -path */root/*overlay2 -prune -o -type f ( -o -name *.log -o -name *.prof ) -print
    find: invalid expression; you have used a binary operator '-o' with nothing before it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ca1e7a3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Windows RS1 has problems with leaking NdisAdapters during the integration
tests; the windows.ps1 script has a cleanup stesp to remove those
leaked adapters.

For internal testing at Microsoft on internal builds, this cleanup step
was skipped, and only ran on the CI machines in our Jenkins.

Due to the move to our new Jenkins, the names of Windows machines changed,
and because of that, the cleanup step was never executed, resulting in the
leaked adapters not being cleaned up:

```
20:32:23  WARNING: There are 608 NdisAdapters leaked under Psched\Parameters
20:32:23  WARNING: Not cleaning as not a production RS1 server
20:32:24  WARNING: There are 608 NdisAdapters leaked under WFPLWFS\Parameters
20:32:24  WARNING: Not cleaning as not a production RS1 server
```

```
22:01:31  WARNING: There are 1209 NdisAdapters leaked under Psched\Parameters
22:01:31  WARNING: Not cleaning as not a production RS1 server
22:01:31  WARNING: There are 1209 NdisAdapters leaked under WFPLWFS\Parameters
22:01:31  WARNING: Not cleaning as not a production RS1 server
```

This patch removes the check for non-production builds, and unconditionally
cleans up leaked adapters if they are found.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 156ad54)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 18.09_backport_jenkinsfile branch from 5a7a4db to 6a15a81 Compare August 31, 2019 12:36
@thaJeztah
Copy link
Member Author

thaJeztah commented Sep 1, 2019

only one failure now on Janky, which is a flaky test (tracked through moby#34988); https://ci.docker.com/public/job/engine/job/PR-338/8/execution/node/163/log/?consoleFull

18:49:52  FAIL: docker_api_swarm_test.go:362: DockerSwarmSuite.TestAPISwarmRaftQuorum
18:49:52  
18:49:52  Creating a new daemon at: /go/src/github.com/docker/docker/bundles/test-integration/3/DockerSwarmSuite.TestAPISwarmRaftQuorum
18:49:52  [d09914cb2756b] waiting for daemon to start
18:49:52  [d09914cb2756b] daemon started
18:49:52  
18:49:52  Creating a new daemon at: /go/src/github.com/docker/docker/bundles/test-integration/3/DockerSwarmSuite.TestAPISwarmRaftQuorum
18:49:52  [dcdd98e67722e] waiting for daemon to start
18:49:52  [dcdd98e67722e] daemon started
18:49:52  
18:49:52  Creating a new daemon at: /go/src/github.com/docker/docker/bundles/test-integration/3/DockerSwarmSuite.TestAPISwarmRaftQuorum
18:49:52  [dc945769c5205] waiting for daemon to start
18:49:52  [dc945769c5205] daemon started
18:49:52  
18:49:52  [dcdd98e67722e] exiting daemon
18:49:52  waited for 5.350294ms (out of 30s)
18:49:52  [dc945769c5205] exiting daemon
18:49:52  docker_api_swarm_test.go:394:
18:49:52      // d1 will eventually step down from leader because there is no longer an active quorum, wait for that to happen
18:49:52      waitAndAssert(c, defaultReconciliationTimeout, func(c *check.C) (interface{}, check.CommentInterface) {
18:49:52          _, err := cli.ServiceCreate(context.Background(), service.Spec, types.ServiceCreateOptions{})
18:49:52          return err.Error(), nil
18:49:52      }, checker.Contains, "Make sure more than half of the managers are online.")
18:49:52  docker_utils_test.go:435:
18:49:52      c.Assert(v, checker, args...)
18:49:52  ... obtained string = "Error response from daemon: rpc error: code = DeadlineExceeded desc = context deadline exceeded"
18:49:52  ... substring string = "Make sure more than half of the managers are online."
18:49:52  
18:49:52  waited for 34.957044957s (out of 30s)
18:49:52  [d09914cb2756b] exiting daemon

Let me see if we had fixes/changes for that test

Copy link

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewhsu andrewhsu merged commit 4812304 into docker-archive:18.09 Sep 23, 2019
@thaJeztah thaJeztah deleted the 18.09_backport_jenkinsfile branch September 23, 2019 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants