Commit graph

35491 commits

Author SHA1 Message Date
Derek McGowan
8fb5f4d5c9
Add configuration option for containerd cri
Disable cri plugin by default in containerd and
allows an option to enable the plugin. This only
has an effect on containerd when supervised by
dockerd. When containerd is managed outside of
dockerd, the configuration is not effected.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-07-24 11:34:47 -07:00
Sebastiaan van Stijn
cc7cda1968
Merge pull request #37483 from thaJeztah/fix-nit-pick
Use constant for task runtime value
2018-07-18 17:31:44 +02:00
Brian Goff
25ec60d3cd
Merge pull request #37484 from thaJeztah/bump_swarmkit
Update swarmkit to 68266392a176434d282760d2d6d0ab4c68edcae6
2018-07-17 15:12:00 -07:00
Tibor Vass
9ebed53c54
Merge pull request #37439 from tiborvass/vendor-buildkit
Set BuildKit's ExportedProduct variable to show useful errors in the future
2018-07-17 12:10:23 -07:00
Sebastiaan van Stijn
c9377f4552
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>
2018-07-17 20:55:07 +02:00
Sebastiaan van Stijn
2b7d34977e
Use constant for task runtime value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-17 20:41:25 +02:00
Sebastiaan van Stijn
8f683c6ed5
Merge pull request #37477 from thaJeztah/fix_TestExternalGraphDriver_pull
Fix flaky TestExternalGraphDriver/pull test
2018-07-17 20:36:22 +02:00
Sebastiaan van Stijn
352db26d5f
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>
2018-07-17 10:45:33 +02:00
Tibor Vass
81599222fc validate: please vet
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-07-16 21:41:54 +00:00
Tibor Vass
195919d9d6 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>
2018-07-16 21:41:54 +00:00
Tibor Vass
0ab7c1c5ba vendor: buildkit to 98f1604134f945d48538ffca0e18662337b4a850
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-07-16 21:41:53 +00:00
Vincent Demeester
a5495f289a
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
2018-07-16 14:00:44 +02:00
Yong Tang
492545e139
Merge pull request #37396 from yui-knk/error_when_base_name_resolved_to_blank
Return error if basename is expanded to blank
2018-07-15 15:42:57 -07:00
Yuichiro Kaneko
c9542d313e Return error if basename is expanded to blank
Fix: https://github.com/moby/moby/issues/37325

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-15 22:29:03 +09:00
Yong Tang
17dc10123f
Merge pull request #37454 from thaJeztah/swagger-lint
Fix golint warning on generated "volume" types
2018-07-14 12:46:26 -07:00
Akihiro Suda
d080de7074
Merge pull request #37449 from thaJeztah/in_a_different_context
Remove stray uses of "golang.org/x/net/context"
2018-07-15 01:15:36 +09:00
Tibor Vass
a2a1d04bca
Merge pull request #37451 from thaJeztah/refactor_system_info
Refactor daemon.info to reduce cyclomatic complexity
2018-07-13 16:47:28 -07:00
Yong Tang
126d038831
Merge pull request #37455 from fcrisciani/fix-internal
Fix flakyness in TestDockerNetworkInternalMode
2018-07-13 15:26:05 -07:00
Arash Deshmeh
0e57ceae0d moved integration tests from docker_cli_config_create_test.go to integration/config
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-07-13 17:29:02 -04:00
Flavio Crisciani
a2bb2144b3
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>
2018-07-13 11:43:38 -07:00
Sebastiaan van Stijn
bd06a5ea4d
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>
2018-07-13 16:58:59 +02:00
Sebastiaan van Stijn
c03d3a416b
Unexport daemon.FillPlatformInfo
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-13 13:16:34 +02:00
Sebastiaan van Stijn
50eaed4d0c
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>
2018-07-13 13:10:05 +02:00
Sebastiaan van Stijn
23f4a3d509
Merge pull request #37445 from kolyshkin/continuity
vendor: update continuity to 0377f7d767206
2018-07-13 12:12:09 +02:00
Sebastiaan van Stijn
bd0a4ac1c5
Merge pull request #37446 from kolyshkin/lcow
lcow: fix debug in startServiceVMIfNotRunning()
2018-07-13 12:10:26 +02:00
Sebastiaan van Stijn
a8b4e04e2f
Fix API template to not use "golang.org/x/net/context"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-13 09:54:24 +02:00
Sebastiaan van Stijn
4c0a050ee2
Remove stray uses of "golang.org/x/net/context"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-13 09:53:36 +02:00
Kir Kolyshkin
c64a2448d1 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>
2018-07-12 16:38:05 -07:00
Sebastiaan van Stijn
f9470d8189
Merge pull request #37422 from thaJeztah/fix-linting-errors
Fix some golint and ineffassign issues
2018-07-13 00:25:46 +02:00
Kir Kolyshkin
b7a95a3ce4 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>
2018-07-12 13:42:23 -07:00
Sebastiaan van Stijn
460297b5fb
Merge pull request #37440 from msabansal/errorfix
Fix error string in docker CLI test
2018-07-12 13:47:47 +02:00
Sandeep Bansal
76ace9bb5e Fix error string in docker CLI test
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
2018-07-11 23:02:44 -07:00
Yong Tang
705774aa76
Merge pull request #37436 from thaJeztah/bump_metalinter
Bump gometalinter to v2.0.6
2018-07-11 15:44:45 -07:00
Sebastiaan van Stijn
5fc12449d8
Merge pull request #37437 from thaJeztah/format_fixes
Various formatting fixes / compilation issues caught by Go 1.11
2018-07-11 23:14:19 +02:00
Sebastiaan van Stijn
35f7e7c50a
Fix golint issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-11 22:19:03 +02:00
Sebastiaan van Stijn
ddd8a6572d
Fix ineffassign linting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-11 22:18:45 +02:00
Sebastiaan van Stijn
f0585d04d0
Merge pull request #37413 from yui-knk/do_not_Healthcheck_RUN_command
Ensure RUN instruction to run without Healthcheck
2018-07-11 20:38:03 +02:00
Kir Kolyshkin
09ad434f10
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>
2018-07-11 15:52:25 +02:00
Kir Kolyshkin
2e30e9e6db
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>
2018-07-11 15:52:22 +02:00
Kir Kolyshkin
a9a136572d
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>
2018-07-11 15:52:19 +02:00
Sebastiaan van Stijn
3737194b9f
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>
2018-07-11 15:51:51 +02:00
Kir Kolyshkin
bda793d1d4
Bump gometalinter to v2.0.6
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-11 15:41:15 +02:00
Justin Cormack
94a8f4d0d4
Merge pull request #37424 from thaJeztah/bump_libnetwork
Bump libnetwork to d00ceed44cc447c77f25cdf5d59e83163bdcb4c9
2018-07-11 12:04:41 +01:00
Yong Tang
e6aa71b190
Merge pull request #37431 from tonistiigi/mountable-fix
builder: fix duplicate calls to mountable
2018-07-10 18:26:57 -07:00
Tonis Tiigi
ffa7233d15 builder: fix duplicate calls to mountable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-10 15:21:29 -07:00
Sebastiaan van Stijn
56b14b8c25
Merge pull request #37425 from cpuguy83/bump_containerd_1.1.1
Bump containerd daemon to v1.1.1
2018-07-10 13:02:22 +02:00
Brian Goff
c083eb7595 Bump containerd daemon to v1.1.1
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-07-09 16:00:20 -07:00
Tianon Gravi
c04f9ae9d7
Merge pull request #37398 from mykeul/master
mkimage-alpine.sh: Removed the "-i -t" arguments from the smoke test calling printf (the…
2018-07-09 14:50:53 -06:00
Sebastiaan van Stijn
42bd8e1b10
Merge pull request #37419 from thaJeztah/pass_loglevel_to_containerd
Pass log-level to containerd
2018-07-09 21:59:47 +02:00
Sebastiaan van Stijn
d58c4cbe6c
Bump libnetwork to d00ceed44cc447c77f25cdf5d59e83163bdcb4c9
The absence of the file /proc/sys/net/ipv6/conf/all/disable_ipv6
doesn't appear to affect functionality, at least at this time.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-09 21:03:50 +02:00