Commit graph

37014 commits

Author SHA1 Message Date
Sebastiaan van Stijn
2de5e3afad
Merge pull request #39452 from crosbymichael/test-restart
Improve select for daemon restart tests
2019-07-03 01:11:27 +02:00
Sebastiaan van Stijn
77657ea737
Merge pull request #39346 from dperny/fix-more-grpc-sizes
Fix more grpc list message sizes
2019-07-02 23:07:53 +02:00
Michael Crosby
527f9f75d6
Merge pull request #39423 from carlosedp/riscv64
Update modules to support riscv64
2019-07-02 17:07:35 -04:00
Michael Crosby
402433a5e4 Improve select for daemon restart tests
This improves the select logic for the restart tests or starting the
daemon in general.  With the way the ticker and select was setup, it was
possible for only the timeout to be displayed and not the wait errors.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-07-02 16:16:33 -04:00
Michael Crosby
a43a2ed746
Merge pull request #39445 from lzhfromustc/master
ioutils: Fixed a potential data race in bytespipe
2019-07-02 13:02:47 -04:00
Sebastiaan van Stijn
6a7ebf044c
Merge pull request #39444 from tonistiigi/userns-empty
builder-next: reset identitymapping if empty
2019-07-02 11:02:42 +02:00
lzhfromutsc
c2479f6ebf Fixed the inconsistence and also a potential data race in pkg/ioutils/bytespipe.go: bp.closeErr is read/write 8 times; 7 out of 8 times it is protected by bp.mu.Lock(); 1 out of 8 times it is read without a Lock
Signed-off-by: lzhfromutsc <lzhfromustc@gmail.com>
2019-07-01 11:38:38 -07:00
Tonis Tiigi
0bdcc60c4c builder-next: reset identitymapping if empty
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-01 11:26:27 -07:00
CarlosEDP
9eaab0425b Update modules to support riscv64
Signed-off-by: CarlosEDP <me@carlosedp.com>
2019-06-29 18:45:42 +00:00
Tibor Vass
e105a74c54
Merge pull request #39216 from thaJeztah/bump_vndr
bump vndr to f5ab8fc5f, and revendor
2019-06-29 10:39:37 -07:00
Tibor Vass
73ebb40315
Merge pull request #39435 from tiborvass/fix-containerd-optional-docker-content-digest
vendor: containerd to 7c1e88399
2019-06-29 10:35:54 -07:00
Tibor Vass
14bd416d0e vendor: containerd to 7c1e88399
Fixes https://github.com/moby/buildkit/issues/1062
when DOCKER_BUILDKIT=1

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-28 18:28:09 +00:00
Sebastiaan van Stijn
0a3c9b935c bump vndr to f5ab8fc5f, and revendor
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-28 18:13:17 +00:00
Michael Crosby
70f67c6240
Merge pull request #39409 from thaJeztah/bump_libseccomp
bump libseccomp-golang v0.9.1
2019-06-28 09:58:06 -04:00
Tibor Vass
9e6f83bee1
Merge pull request #39054 from thaJeztah/bump_libnetwork2
bump libnetwork. vishvananda/netlink 1.0, vishvananda/netns
2019-06-27 10:34:01 -07:00
Yong Tang
818f2f359f
Merge pull request #39394 from thaJeztah/improve_flag_description
Improve description for cpu-rt-period,runtime daemon flags
2019-06-27 20:27:44 +08:00
Yong Tang
8bf7e6a2dc
Merge pull request #39373 from yongtang/security
Update SECURITY.md to have an option to keep name anonymous if requested
2019-06-27 20:27:28 +08:00
Brian Goff
a50869f077
Merge pull request #39381 from thaJeztah/bump_gorilla_mux
bump gorilla/mux v1.7.2
2019-06-26 10:07:57 -07:00
Sebastiaan van Stijn
344b093258
bump libnetwork. vishvananda/netlink 1.0, vishvananda/netns
full diffs:

- fc5a7d91d5...62a13ae87c
- b2de5d10e3...v1.0.0
- 604eaf189e...13995c7128ccc8e51e9a6bd2b551020a27180abd

notable changes in libnetwork:

- docker/libnetwork#2366 Bump vishvananda/netlink to 1.0.0
- docker/libnetwork#2339 controller: Check if IPTables is enabled for arrangeUserFilterRule
  - addresses docker/libnetwork#2158 dockerd when run with --iptables=false modifies iptables by adding DOCKER-USER
  - addresses moby/moby#35777 With iptables=false dockerd still creates DOCKER-USER chain and rules
  - addresses docker/for-linux#136 dockerd --iptables=false adds DOCKER-USER chain and modify FORWARD chain anyway
- docker/libnetwork#2394 Make DNS records and queries case-insensitive
  - addresses moby/moby#28689 Embedded DNS is case-sensitive
  - addresses moby/moby#21169 hostnames with new networking are case-sensitive

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-25 14:10:15 +02:00
Sebastiaan van Stijn
e01bf76964
bump libseccomp-golang v0.9.1
full diff: 32f571b700...689e3c1541

Release notes:

* Version 0.9.1 - May 21, 2019
- Minimum supported version of libseccomp bumped to v2.2.0
- Use Libseccomp's `seccomp_version` API to retrieve library version
- Unconditionally set TSync attribute for filters, due to Go's heavily threaded nature
- Fix CVE-2017-18367 - Multiple syscall arguments were incorrectly combined with logical-OR, instead of logical-AND
- Fix a failure to build on Debian-based distributions due to CGo code
- Fix unit test failures on 32-bit architectures
- Improve several errors to be more verbose about their causes
- Add support for SCMP_ACT_LOG (with libseccomp versions 2.4.x and higher), permitting syscalls but logging their execution
- Add support for SCMP_FLTATR_CTL_LOG (with libseccomp versions 2.4.x and higher), logging not-allowed actions when they are denied

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-25 10:11:02 +02:00
Sebastiaan van Stijn
dcb3911f76
Merge pull request #39317 from Dmole/patch-1
shellcheck contrib/check-config.sh
2019-06-25 01:17:34 +02:00
Kirill Kolyshkin
67be90dcec
Merge pull request #39358 from jim-docker/testForIpvlan
For ipvlan tests, check that the ipvlan module is there, rather than just testing the kernel version.
2019-06-24 15:33:19 -07:00
Sebastiaan van Stijn
c2deb9f97f
Merge pull request #39360 from emosbaugh/logging-rate-limiter-bucket-fix
Fix rate limiting for logger, increase refill rate
2019-06-24 23:49:29 +02:00
Sebastiaan van Stijn
baa0040fb4
Merge pull request #39374 from tklauser/unix-numcpu
Use functions from x/sys/unix to get number of CPUs on Linux
2019-06-24 15:20:47 +02:00
Sebastiaan van Stijn
6f9cdd6c73
Improve description for cpu-rt-period,runtime daemon flags
These options configure the parent cgroup, not the default for containers,
nor the daemon itself, so adding that information to the flag description
to make this slightly more clear.

relates to 56f77d5ade (#23430) which implemented
these flags.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-21 17:15:21 +02:00
Sebastiaan van Stijn
52c16677b2
Merge pull request #39375 from tiborvass/deprecate-integration-cli
Revert "validate: temporarily disable deprecate-integration-cli as part of a revert"
2019-06-21 10:12:58 +02:00
Sebastiaan van Stijn
25b451e01b
bump gorilla/mux v1.7.2
full diff: https://github.com/gorilla/mux/compare/v1.7.0...v1.7.2

includes:

 - gorilla/mux#457 adding Router.Name to create new Route
 - gorilla/mux#447 host:port matching does not require a :port to be specified

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-20 13:33:46 +02:00
Tibor Vass
a9026e0e3f Revert "validate: temporarily disable deprecate-integration-cli as part of a revert"
This reverts commit 3f1cdd5364.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-19 00:54:14 +00:00
Brian Goff
384c782721
Merge pull request #39355 from tao12345666333/bump-golang-1.12.6
Bump Golang 1.12.6
2019-06-18 13:08:16 -07:00
Tibor Vass
4866f5139a
Merge pull request #39365 from tiborvass/deprecate-v2-schema1
Keep but deprecate registry v2 schema1 logic and revert to libtrust-key-based engine ID
2019-06-18 11:52:35 -07:00
Tobias Klauser
ba8a15694a Use functions from x/sys/unix to get number of CPUs on Linux
Use Getpid and SchedGetaffinity from golang.org/x/sys/unix to get the
number of CPUs in numCPU on Linux.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2019-06-18 19:26:56 +02:00
Yong Tang
1d792e6bba Update SECURITY.md to have an option to keep name anonymous if requested.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-06-18 16:37:16 +00:00
Brian Goff
8d1309222c
Merge pull request #39370 from da-edra/patch-1
Create SECURITY.md for GitHub security policy page
2019-06-18 09:29:08 -07:00
Tibor Vass
3f1cdd5364 validate: temporarily disable deprecate-integration-cli as part of a revert
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-18 01:40:25 +00:00
Tibor Vass
d35f8f4329 Add deprecation message for schema1
This will add a warning log in the daemon, and will send the message
to be displayed by the CLI.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-18 01:40:25 +00:00
Tibor Vass
f923321aae Add test for keeping same daemon ID on upgrade
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-18 01:40:25 +00:00
Tibor Vass
53dad9f027 Remove v1 manifest code
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-18 01:40:25 +00:00
Tibor Vass
f695e98cb7 Revert "Remove the rest of v1 manifest support"
This reverts commit 98fc09128b in order to
keep registry v2 schema1 handling and libtrust-key-based engine ID.

Because registry v2 schema1 was not officially deprecated and
registries are still relying on it, this patch puts its logic back.

However, registry v1 relics are not added back since v1 logic has been
removed a while ago.

This also fixes an engine upgrade issue in a swarm cluster. It was relying
on the Engine ID to be the same upon upgrade, but the mentioned commit
modified the logic to use UUID and from a different file.

Since the libtrust key is always needed to support v2 schema1 pushes,
that the old engine ID is based on the libtrust key, and that the engine ID
needs to be conserved across upgrades, adding a UUID-based engine ID logic
seems to add more complexity than it solves the problems.

Hence reverting the engine ID changes as well.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-18 00:36:01 +00:00
Tibor Vass
0811297608 use gotest.tools assertions in docker_cli_push_test.go
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-18 00:36:00 +00:00
Tibor Vass
f23a51a860 Revert "Remove Schema1 integration test suite"
This reverts commit 13b7d11be1.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-18 00:23:04 +00:00
Brian Goff
882e26a4a8
Merge pull request #39364 from thaJeztah/bump_containerd_1.2.7
Update containerd to v1.2.7
2019-06-17 11:44:28 -07:00
andrea
0a9842a705
Create SECURITY.md for GitHub security policy page
What would you like to be added:
GitHub has a [security policy](https://github.com/moby/moby/security/policy) page that uses a SECURITY.md file from the repository to show the project's security policy.

Why is this needed:
Adding this file makes it easier for security researchers to learn about the correct place to report a vulnerability in the [Moby](https://github.com/moby/moby) project.

Signed-off-by: Andrea <crypto.andrea@protonmail.ch>
2019-06-17 11:34:36 -05:00
Kir Kolyshkin
a77e147d32 For ipvlan tests check that the ipvlan module is enabled (instead of just ensuring the kernel version is greater than 4.2)
Co-Authored-By: Jim Ehrismann <jim-docker@users.noreply.github.com>
Co-Authored-By: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>
Signed-off-by: Jim Ehrismann <jim.ehrismann@docker.com>
2019-06-14 10:49:25 -04:00
Sebastiaan van Stijn
d5669ec1c6
Update containerd to v1.2.7
From the release notes: https://github.com/containerd/containerd/releases/tag/v1.2.7

> Welcome to the v1.2.7 release of containerd!
>
> The seventh patch release for containerd 1.2 introduces OCI image
> descriptor annotation support and contains fixes for containerd shim logs,
> container stop/deletion, cri plugin and selinux.
>
> It also contains several important bug fixes for goroutine and file
> descriptor leakage in containerd and containerd shims.
>
> Notable Updates
>
> - Support annotations in the OCI image descriptor, and filtering image by annotations. containerd/containerd#3254
> - Support context timeout in ttrpc which can help avoid containerd hangs when a shim is unresponsive. containerd/ttrpc#31
> - Fix a bug that containerd shim leaks goroutine and file descriptor after containerd restarts. containerd/ttrpc#37
> - Fix a bug that a container can't be deleted if first deletion attempt is canceled or timeout. containerd/containerd#3264
> - Fix a bug that containerd leaks file descriptor when using v2 containerd shims, e.g. containerd-shim-runc-v1. containerd/containerd#3273
> - Fix a bug that a container with lingering processes can't terminate when it shares pid namespace with another container. moby/moby#38978
> - Fix a bug that containerd can't read shim logs after restart. containerd/containerd#3282
> - Fix a bug that shim_debug option is not honored for existing containerd shims after containerd restarts. containerd/containerd#3283
> - cri: Fix a bug that a container can't be stopped when the exit event is not successfully published by the containerd shim. containerd/containerd#3125, containerd/containerd#3177
> - cri: Fix a bug that exec process is not cleaned up if grpc context is canceled or timeout. contaienrd/cri#1159
> - Fix a selinux keyring labeling issue by updating runc to v1.0.0-rc.8 and selinux library to v1.2.2. opencontainers/selinux#50
> - Update ttrpc to f82148331ad2181edea8f3f649a1f7add6c3f9c2. containerd/containerd#3316
> - Update cri to 49ca74043390bc2eeea7a45a46005fbec58a3f88. containerd/containerd#3330

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-14 13:30:38 +02:00
Sebastiaan van Stijn
fb5fe241b5
Merge pull request #39357 from tiborvass/cp-slash-fix
Fix docker cp when container source path is /
2019-06-14 10:55:40 +02:00
Tibor Vass
7410f1a859 pkg/archive: keep walkRoot clean if source is /
Previously, getWalkRoot("/", "foo") would return "//foo"
Now it returns "/foo"

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-14 03:57:58 +00:00
Drew Erny
a84a78e976 Fix more grpc list message sizes
There are a few more places, apparently, that List operations against
Swarm exist, besides just in the List methods. This increases the max
received message size in those places.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2019-06-13 12:01:49 -05:00
Tibor Vass
171538c190 daemon: fix docker cp when container source is /
Before 7a7357da, archive.TarResourceRebase was being used to copy files
and folders from the container. That function splits the source path
into a dirname + basename pair to support copying a file:
if you wanted to tar `dir/file` it would tar from `dir` the file `file`
(as part of the IncludedFiles option).

However, that path splitting logic was kept for folders as well, which
resulted in weird inputs to archive.TarWithOptions:
if you wanted to tar `dir1/dir2` it would tar from `dir1` the directory
`dir2` (as part of IncludedFiles option).

Although it was weird, it worked fine until we started chrooting into
the container rootfs when doing a `docker cp` with container source set
to `/` (cf 3029e765).

The fix is to only do the path splitting logic if the source is a file.

Unfortunately, 7a7357da added support for LCOW by duplicating some of
this subtle logic. Ideally we would need to do more refactoring of the
archive codebase to properly encapsulate these behaviors behind well-
documented APIs.

This fix does not do that. Instead, it fixes the issue inline.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-13 06:31:15 +00:00
Tibor Vass
02f1eb89a4 add more tests
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-13 06:31:05 +00:00
Brian Goff
6db9f1c3d6 Add test for copying entire container rootfs
CID=$(docker create alpine)
docker cp $CID:/ out

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-12 22:17:18 +00:00