Commit Graph

35499 Commits

Author SHA1 Message Date
cfcd7a95da migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: fbaef1b0d3c5656a8aa5f0424b89c118ca277427
Component: engine
2018-07-25 14:49:02 -04:00
19f93d0875 Merge pull request #37498 from kolyshkin/tarsum
pkg/tarsum: fix unit test for Go 1.11+
Upstream-commit: 1ef1cc8388165b2b848f9b3f53ec91c87de09f63
Component: engine
2018-07-21 10:51:48 +02:00
2753c62859 Merge pull request #37499 from kolyshkin/ct-go-111
vendor: bump google/certificate-transparency-go to 1.0.20
Upstream-commit: 683738900eec52f86b834234eeef054c4e135031
Component: engine
2018-07-19 14:06:07 +02:00
9e7eb9d07a Merge pull request #37500 from kolyshkin/osusergo
Add osusergo build tar for static binaries
Upstream-commit: 24711b7eba4471170301ca0d8cb40451dda2495d
Component: engine
2018-07-19 13:57:44 +02:00
197ec1c2ab Add osusergo build tar for static binaries
Go 1.11 includes a fix to os/user to be working in a static binary
(fixing https://github.com/golang/go/issues/23265). The fix requires
`osusergo` build tag to be set for static binaries, which is what
this commit adds (also for containerd).

[v2: sort build tags alphabetically]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 70cdb1c66429582ecfdc5abed67189dd90ab7572
Component: engine
2018-07-19 12:25:46 +03:00
2a78eeac5b vendor: bump google/certificate-transparency-go to 1.0.20
This is to include the Windows + Go1.11 fix
(https://github.com/google/certificate-transparency-go/issues/284).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: dacefc32b27816c26caeba713b88f6767d2486d7
Component: engine
2018-07-19 10:47:53 +03:00
e5efa80e0f pkg/tarsum: fix unit test for Go 1.11+
Since go-1.11beta1 archive/tar, tar headers with Typeflag == TypeRegA
(numeric 0) (which is the default unless explicitly initialized) are
modified to have Typeflag set to either tar.TypeReg (character value
'0', not numeric 0) or tar.TypeDir (character value '5') [1].
This results in different Typeflag value in the resulting header,
leading to a different Checksum, and causing the following test
case errors:

> 12:09:14 --- FAIL: TestTarSums (0.05s)
> 12:09:14 tarsum_test.go:393: expecting
> [tarsum+sha256:8bf12d7e67c51ee2e8306cba569398b1b9f419969521a12ffb9d8875e8836738],
> but got
> [tarsum+sha256:75258b2c5dcd9adfe24ce71eeca5fc5019c7e669912f15703ede92b1a60cb11f]
> ... (etc.)

All the other code explicitly sets the Typeflag field, but this test
case is not, causing the incompatibility with Go 1.11. Therefore,
the fix is to set TypeReg explicitly, and change the expected checksums
in test cases).

Alternatively, we can vendor archive/tar again (for the 100th time),
but given that the issue is limited to the particular test case it
does not make sense.

This fixes the test for all Go versions.

[1] https://go-review.googlesource.com/c/go/+/85656

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 05cbe23db9836476677e7071d21ad53bf93dc2e7
Component: engine
2018-07-19 10:38:45 +03:00
0606266d6e Merge pull request #37467 from thaJeztah/bump_containerd_1.1.2
Bump containerd daemon to v1.1.2
Upstream-commit: 7f91801cc86ea6be117fad9c11080fe1702ad96f
Component: engine
2018-07-18 22:29:23 +02:00
6f81e7d4d9 Merge pull request #37483 from thaJeztah/fix-nit-pick
Use constant for task runtime value
Upstream-commit: cc7cda1968062fc6dde28c93e85a0192d58b6d90
Component: engine
2018-07-18 17:31:44 +02:00
e9484ed940 Merge pull request #37484 from thaJeztah/bump_swarmkit
Update swarmkit to 68266392a176434d282760d2d6d0ab4c68edcae6
Upstream-commit: 25ec60d3cdc14a444f54b741a65ef5ef199844a2
Component: engine
2018-07-17 15:12:00 -07:00
1244bbdf28 Merge pull request #37439 from tiborvass/vendor-buildkit
Set BuildKit's ExportedProduct variable to show useful errors in the future
Upstream-commit: 9ebed53c5431a7c8296107869f1b3feabee9e8f3
Component: engine
2018-07-17 12:10:23 -07:00
6bdc6fed4e Update swarmkit to 68266392a176434d282760d2d6d0ab4c68edcae6
changes included:

- swarmkit #2706 address unassigned task leak when service is removed
- swarmkit #2676 Fix racy batching on the dispatcher
- swarmkit #2693 Fix linting issues revealed by Go 1.11

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c9377f45529d5dce21c264947b73c7053f316467
Component: engine
2018-07-17 20:55:07 +02:00
58b60f8a46 Use constant for task runtime value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b7d34977e72054d197a481a10addd773aa23ca4
Component: engine
2018-07-17 20:41:25 +02:00
b67ec60ca6 Merge pull request #37477 from thaJeztah/fix_TestExternalGraphDriver_pull
Fix flaky TestExternalGraphDriver/pull test
Upstream-commit: 8f683c6ed5395872656ace8d8b1b5ebfbb2a6de1
Component: engine
2018-07-17 20:36:22 +02:00
bb64046f90 Fix flaky TestExternalGraphDriver/pull test
This test occassionally fails on s390x and Power;

    03:16:04 --- FAIL: TestExternalGraphDriver/pull (1.08s)
    03:16:04 external_test.go:402: assertion failed: error is not nil: Error: No such image: busybox:latest

Most likely these failures are caused due to Docker Hub updating
the busybox:latest image, but not all architectures yet being
available.

Instead of using `:latest`, pull an image by digest, so that
the test doesn't depend on Docker Hub having all architectures
available for `:latest`.

I selected the same digest as is currently used as "frozen image"
in the Dockerfile.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 352db26d5fd896b681046b1119f07e0ce1ed45b8
Component: engine
2018-07-17 10:45:33 +02:00
3b5e16f319 validate: please vet
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 81599222fc8f8a845b68ca15f3582e76de24a7b3
Component: engine
2018-07-16 21:41:54 +00:00
5dc7f8fc9b builder: set buildkit's exported product variable via PRODUCT
This introduces a PRODUCT environment variable that is used to set a constant
at dockerversion.ProductName.

That is then used to set BuildKit's ExportedProduct variable in order to show
useful error messages to users when a certain version of the product doesn't
support a BuildKit feature.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 195919d9d645aa4ab5680a2331c57ff33eb9e5d9
Component: engine
2018-07-16 21:41:54 +00:00
adc3470981 vendor: buildkit to 98f1604134f945d48538ffca0e18662337b4a850
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 0ab7c1c5bacdf8b18c66b729bb7f919f6acfcf29
Component: engine
2018-07-16 21:41:53 +00:00
4a2ba80f95 Merge pull request #37457 from adshmh/migrate-docker_cli_config_create_test-integration-tests-to-integration-config
moved integration tests from docker_cli_config_create_test.go to integration/config
Upstream-commit: a5495f289aafafac8a01c62f2a9cb44856658ece
Component: engine
2018-07-16 14:00:44 +02:00
2fe05a785a Bump containerd daemon to v1.1.2
Updates cri version to 1.0.4, to add `max-container-log-line-size`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9e773a12fb1cc5da7bec13d46fe04673a4593632
Component: engine
2018-07-16 12:02:15 +02:00
3fa9808e55 Merge pull request #37396 from yui-knk/error_when_base_name_resolved_to_blank
Return error if basename is expanded to blank
Upstream-commit: 492545e139e7461aac044149a931bb4b2dd48f75
Component: engine
2018-07-15 15:42:57 -07:00
900616b995 Return error if basename is expanded to blank
Fix: https://github.com/moby/moby/issues/37325

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: c9542d313e2a52807644742e5fd684bc2de9f507
Component: engine
2018-07-15 22:29:03 +09:00
ef023f77a6 Merge pull request #37454 from thaJeztah/swagger-lint
Fix golint warning on generated "volume" types
Upstream-commit: 17dc10123f001d1481e4047de211c8aec7ed9d34
Component: engine
2018-07-14 12:46:26 -07:00
29bb93b3d8 Merge pull request #37449 from thaJeztah/in_a_different_context
Remove stray uses of "golang.org/x/net/context"
Upstream-commit: d080de7074a05a1534bf7e91d000a311885fa221
Component: engine
2018-07-15 01:15:36 +09:00
3c9a878585 Merge pull request #37451 from thaJeztah/refactor_system_info
Refactor daemon.info to reduce cyclomatic complexity
Upstream-commit: a2a1d04bcae54129b5c4ddad4e4f68458fb5ef3d
Component: engine
2018-07-13 16:47:28 -07:00
bd376a2767 Merge pull request #37455 from fcrisciani/fix-internal
Fix flakyness in TestDockerNetworkInternalMode
Upstream-commit: 126d038831dccf82bdcd1a19ee765e89bc07fcd7
Component: engine
2018-07-13 15:26:05 -07:00
14ed98c1a4 moved integration tests from docker_cli_config_create_test.go to integration/config
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 0e57ceae0dd42491ed81538bf4d9164218080b66
Component: engine
2018-07-13 17:29:02 -04:00
5fea4ae591 Fix flakyness in TestDockerNetworkInternalMode
Instead of waiting for the DNS to fail, try to access
a specific external IP and verify that 100% of the pakcets
are being lost.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: a2bb2144b3e0d49ac615976bfac462a307d85f0e
Component: engine
2018-07-13 11:43:38 -07:00
d1e4c2c766 Fix golint warning on generated "volume" types
Should fix

```
api/types/volume/volume_create.go
Line 10: warning: comment on exported type VolumeCreateBody should be of the form "VolumeCreateBody ..." (with optional leading article) (golint)

api/types/volume/volume_list.go
Line 12: warning: comment on exported type VolumeListOKBody should be of the form "VolumeListOKBody ..." (with optional leading article) (golint)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bd06a5ea4df919ff323510fba10801b5673a3af6
Component: engine
2018-07-13 16:58:59 +02:00
c1dba76a94 Unexport daemon.FillPlatformInfo
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c03d3a416b24c18dfbb938397052eebd8b67d1a3
Component: engine
2018-07-13 13:16:34 +02:00
91b7b13fc2 Refactor daemon.info to reduce cyclomatic complexity
Before this change;

    gocyclo daemon/info.go
    17 daemon (*Daemon).SystemInfo daemon/info.go:27:1
    2 daemon (*Daemon).SystemVersion daemon/info.go:150:1
    1 daemon (*Daemon).showPluginsInfo daemon/info.go:195:1

After this change;

    gocyclo daemon/info.go
    8 daemon (*Daemon).fillSecurityOptions daemon/info.go:150:1
    5 daemon operatingSystem daemon/info.go:201:1
    3 daemon (*Daemon).fillDriverInfo daemon/info.go:121:1
    2 daemon hostName daemon/info.go:172:1
    2 daemon memInfo daemon/info.go:192:1
    2 daemon kernelVersion daemon/info.go:182:1
    1 daemon (*Daemon).SystemVersion daemon/info.go:81:1
    1 daemon (*Daemon).SystemInfo daemon/info.go:27:1
    1 daemon (*Daemon).fillPluginsInfo daemon/info.go:138:1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 50eaed4d0c1492479ed4d83eb97424d21a3e458d
Component: engine
2018-07-13 13:10:05 +02:00
bd3a5eca16 Merge pull request #37445 from kolyshkin/continuity
vendor: update continuity to 0377f7d767206
Upstream-commit: 23f4a3d5091b878b252bef73ce6ab10a54641eb4
Component: engine
2018-07-13 12:12:09 +02:00
4dc1b1b81b Merge pull request #37446 from kolyshkin/lcow
lcow: fix debug in startServiceVMIfNotRunning()
Upstream-commit: bd0a4ac1c5bbf6a613c39be9cc2b74f1a1cc73ca
Component: engine
2018-07-13 12:10:26 +02:00
8ce22ea6b6 Fix API template to not use "golang.org/x/net/context"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a8b4e04e2f6ae95a5146c4c4d794cda1a725c634
Component: engine
2018-07-13 09:54:24 +02:00
bcde4812db Remove stray uses of "golang.org/x/net/context"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4c0a050ee24beb399b11c48829522e48f8d0b98a
Component: engine
2018-07-13 09:53:36 +02:00
1efda2126e vendor: update continuity to 0377f7d767206
This is to include the Go 1.11 fix
(https://github.com/containerd/continuity/pull/120).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c64a2448d1f2b7ba680dcb017cd46dcb8ac359c4
Component: engine
2018-07-12 16:38:05 -07:00
882263fbf1 Merge pull request #37422 from thaJeztah/fix-linting-errors
Fix some golint and ineffassign issues
Upstream-commit: f9470d8189e25c297c6c7bd9ac592b6e5acd951e
Component: engine
2018-07-13 00:25:46 +02:00
8a9efc106f lcow: fix debug in startServiceVMIfNotRunning()
When go-1.11beta1 is used for building, the following error is
reported:

> 14:56:20 daemon\graphdriver\lcow\lcow.go:236: Debugf format %s reads
> arg #2, but call has 1 arg

While fixing this, let's also fix a few other things in this
very function (startServiceVMIfNotRunning):

1. Do not use fmt.Printf when not required.
2. Use `title` whenever possible.
3. Don't add `id` to messages as `title` already has it.
4. Remove duplicated colons.
5. Try to unify style of messages.
6. s/startservicevmifnotrunning/startServiceVMIfNotRunning/
...

In general, logging/debugging here is a mess and requires much more
love than I can give it at the moment. Areas for improvement:

1. Add a global var logger = logrus.WithField("storage-driver", "lcow")
and use it everywhere else in the code.
2. Use logger.WithField("id", id) whenever possible (same for "context"
and other similar fields).
3. Revise all the errors returned to be uniform.
4. Make use of errors.Wrap[f] whenever possible.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: b7a95a3ce4c731c0fca204435be758ea89d6050f
Component: engine
2018-07-12 13:42:23 -07:00
cb708746f4 Merge pull request #37440 from msabansal/errorfix
Fix error string in docker CLI test
Upstream-commit: 460297b5fb6bf091bc91b6f8cfbe396c6a483826
Component: engine
2018-07-12 13:47:47 +02:00
dc41641256 Fix error string in docker CLI test
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
Upstream-commit: 76ace9bb5e2c5ecdd02046956ab00f76c3b25a3a
Component: engine
2018-07-11 23:02:44 -07:00
6de0e3f629 Merge pull request #37436 from thaJeztah/bump_metalinter
Bump gometalinter to v2.0.6
Upstream-commit: 705774aa7683892fc214d2b028d226f24ad20f1c
Component: engine
2018-07-11 15:44:45 -07:00
c5fdcd4c55 Merge pull request #37437 from thaJeztah/format_fixes
Various formatting fixes / compilation issues caught by Go 1.11
Upstream-commit: 5fc12449d830ae9005138fb3d3782728fa8d137a
Component: engine
2018-07-11 23:14:19 +02:00
d799a9b46d Fix golint issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 35f7e7c50a131494c9d530800e80bf2da42fb89c
Component: engine
2018-07-11 22:19:03 +02:00
a174fffcfe Fix ineffassign linting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ddd8a6572d36a6d0db2aa21d697018f419a7b424
Component: engine
2018-07-11 22:18:45 +02:00
6029eff9d1 Merge pull request #37413 from yui-knk/do_not_Healthcheck_RUN_command
Ensure RUN instruction to run without Healthcheck
Upstream-commit: f0585d04d079d289b7b9cb572f8ee509f6768402
Component: engine
2018-07-11 20:38:03 +02:00
99d1e1cf76 loggerutils: build fixes, improve errors
There are two build errors when using go-1.11beta1:

> daemon/logger/loggerutils/logfile.go:367: Warningf format %q arg f.Name is a func value, not called
> daemon/logger/loggerutils/logfile.go:564: Debug call has possible formatting directive %v

In the first place, the file name is actually not required as error
message already includes it.

While at it, fix a couple of other places for more correct messages, and
make sure to not add a file name if an error already has it.

Fixes: f69f09f44c
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 09ad434f10cff48741322854a3003686b28295b5
Component: engine
2018-07-11 15:52:25 +02:00
d01a9704de aufs: fix Wrapf args
Fix the following go-1.11beta1 build error:

> daemon/graphdriver/aufs/aufs.go:376: Wrapf format %s reads arg #1, but call has 0 args

While at it, change '%s' to %q.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2e30e9e6db42043cb2bd67d25a7152488c834f9f
Component: engine
2018-07-11 15:52:22 +02:00
14a71772f5 Compile fix
Go 1.11beta1 (rightfully) complains:

> 15:38:37 daemon/cluster/controllers/plugin/controller.go:183:
> Entry.Debugf format %#T has unrecognized flag #

This debug print was added by commit 72c3bcf2a5.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a9a136572dc2a2c2ec5da320c4d0a32b5a15c550
Component: engine
2018-07-11 15:52:19 +02:00
2a7994f372 daemon/*.go: fix some Wrap[f]/Warn[f] errors
In particular, these two:
> daemon/daemon_unix.go:1129: Wrapf format %v reads arg #1, but call has 0 args
> daemon/kill.go:111: Warn call has possible formatting directive %s

and a few more.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3737194b9f2875c10f3f2117c1816054ba0ff262
Component: engine
2018-07-11 15:51:51 +02:00
c5b67f5adc Bump gometalinter to v2.0.6
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bda793d1d4b4000154d057afb9621f5123bb0dac
Component: engine
2018-07-11 15:41:15 +02:00