Commit graph

36971 commits

Author SHA1 Message Date
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
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
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
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
Sebastiaan van Stijn
4dc6b217d3
Merge pull request #39359 from tiborvass/fix-test-compiling
integration: get tests to compile again
2019-06-12 22:59:59 +02:00
Tibor Vass
a281289515 integration: get tests to compile again
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-12 20:41:36 +00:00
Sebastiaan van Stijn
04ff4a2ba4
Merge pull request #39137 from arkodg/attach-to-existing-network-error
Handle the error case when a container reattaches to the same network
2019-06-12 19:58:04 +02:00
Sebastiaan van Stijn
39c8e88068
Merge pull request #39349 from tonistiigi/buildkit-userns-remap
builder-next: userns remap support
2019-06-12 16:49:19 +02:00
Brian Goff
349d4dd0c9
Merge pull request #39294 from AkihiroSuda/remove-it-on-swarm
hack: remove integration-cli-on-swarm
2019-06-11 14:24:48 -07:00
Brian Goff
02dceeaa7b
Merge pull request #39240 from olljanat/enable-new-integration-tests-for-win
Enable integrations API tests for Windows CI
2019-06-11 14:24:03 -07:00
Sebastiaan van Stijn
29829874d1
Merge pull request #39270 from kolyshkin/moar-aufs-fixes
aufs: retry umount on ebusy, ignore ENOENT in graphdriver.Mounted
2019-06-11 20:43:50 +02:00
Sebastiaan van Stijn
e511b3be89
Merge pull request #39336 from justincormack/entropy-cannot-be-saved
Entropy cannot be saved
2019-06-11 18:40:19 +02:00
Sebastiaan van Stijn
9e763de6ad
Merge pull request #39121 from goldwynr/master
apparmor: allow readby and tracedby
2019-06-11 18:25:47 +02:00
Tonis Tiigi
5c484890e0 vendor: update buildkit to c2427506
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-10 21:49:22 -07:00
Tonis Tiigi
07b3aac902 builder-next: userns remap support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-10 21:49:17 -07:00
Olli Janatuinen
2f22247cad Enable integrations API tests for Windows CI
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
2019-06-10 21:32:36 +03:00
Akihiro Suda
238f8eaa31
Merge pull request #39337 from thaJeztah/bump_libnetwork
Re-align proxy commit with libnetwork vendor
2019-06-08 04:14:14 +09:00
Brian Goff
2b15825d9c
Merge pull request #39327 from tonistiigi/improve-non-cgo
allow dockerd builds without cgo
2019-06-07 10:07:44 -07:00
Sebastiaan van Stijn
35069de3fd
Re-align proxy commit with libnetwork vendor
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-07 15:57:23 +02:00
Yong Tang
b10cd5c0e6
Merge pull request #39332 from thaJeztah/fix_golint_again
Integration: change signatures to fix golint warnings
2019-06-07 06:46:58 -07:00
Sebastiaan van Stijn
28678f2226
Merge pull request #38349 from wk8/wk8/os_version
Adding OS version info to nodes' `Info` struct and to the system info's API
2019-06-07 14:54:51 +02:00
Sebastiaan van Stijn
66f8f2b87c
Merge pull request #39193 from olljanat/38488-layer-garbage-collector
Added garbage collector for image layers
2019-06-07 14:08:04 +02:00
Sebastiaan van Stijn
c85fe2d224
Merge pull request #38522 from cpuguy83/fix_timers
Make sure timers are stopped after use.
2019-06-07 13:16:46 +02:00
Sebastiaan van Stijn
dac5710b68
integration: change testGraphDriver signature to fix linting
Line 441: warning: context.Context should be the first parameter of a function (golint)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-07 13:05:51 +02:00
Sebastiaan van Stijn
123e29f44a
integration: change createAmbiguousNetworks signature to fix linting
Line 30: warning: context.Context should be the first parameter of a function (golint)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-07 13:05:43 +02:00
Sebastiaan van Stijn
9f9b4290b9
integration: change container.Run signature to fix linting
Line 59: warning: context.Context should be the first parameter of a function (golint)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-07 13:05:26 +02:00
Sebastiaan van Stijn
b4c46b0dac
integration: change container.Create signature to fix linting
```
Line 25: warning: context.Context should be the first parameter of a function (golint)
Line 44: warning: context.Context should be the first parameter of a function (golint)
Line 52: warning: context.Context should be the first parameter of a function (golint)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-07 13:04:44 +02:00
Sebastiaan van Stijn
caec45a37f
integration: change network.CreateNoError signature to fix linting
Line 30: warning: context.Context should be the first parameter of a function (golint)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-07 13:03:24 +02:00
Justin Cormack
2df693e533
Entropy cannot be saved
Remove non cryptographic randomness.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2019-06-07 11:54:45 +01:00
Jean Rouge
d363a1881e Adding OS version info to the nodes' Info struct
This is needed so that we can add OS version constraints in Swarmkit, which
does require the engine to report its host's OS version (see
https://github.com/docker/swarmkit/issues/2770).

The OS version is parsed from the `os-release` file on Linux, and from the
`ReleaseId` string value of the `SOFTWARE\Microsoft\Windows NT\CurrentVersion`
registry key on Windows.

Added unit tests when possible, as well as Prometheus metrics.

Signed-off-by: Jean Rouge <rougej+github@gmail.com>
2019-06-06 22:40:10 +00:00
Kirill Kolyshkin
1d5748d975
Merge pull request #39173 from olljanat/25885-capabilities-swarm
Add support for capabilities options in services
2019-06-06 15:03:46 -07:00
Brian Goff
cf406eb359
Merge pull request #39307 from kolyshkin/aufs-reinstate-mntL
Revert "aufs: remove mntL"
2019-06-06 11:22:16 -07:00
Brian Goff
4961f30d88
Merge pull request #39325 from thaJeztah/harden_TestPsListContainersFilterExited
Harden TestPsListContainersFilterExited
2019-06-06 11:21:34 -07:00
Tonis Tiigi
cf104d85c3 stats: avoid cgo in collector
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-05 22:21:11 -07:00
Tonis Tiigi
230a55d337 copy: allow non-cgo build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-05 22:21:11 -07:00
Tonis Tiigi
186cd7cf4a quota: add noncgo build tag
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-05 22:21:06 -07:00
Akihiro Suda
e0fefb9a7f
Merge pull request #39309 from thaJeztah/fix_api_history2
Move cgroup info changes to API v1.40
2019-06-06 13:39:35 +09:00
Tõnis Tiigi
db18c6f133
Merge pull request #39318 from thaJeztah/fix_typo
Fix typo retreive -> retrieve
2019-06-05 16:31:11 -07:00
Olli Janatuinen
213681b66a First step to implement full garbage collector for image layers
Refactored exiting logic on way that layers are first marked to be under
removal so if actual removal fails they can be found from disk and
cleaned up.

Full garbage collector will be implemented as part of containerd
migration.

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
2019-06-05 22:02:42 +03:00
Sebastiaan van Stijn
915acffdb4
Harden TestPsListContainersFilterExited
This test runs on a daemon also used by other tests
so make sure we don't get failures if another test
doesn't cleanup or is running in parallel.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-05 17:02:44 +02:00
Sebastiaan van Stijn
71e00574c7
Merge pull request #39279 from ZYecho/fix-swagger-copy
fix: fix lack of copyUIDGID in swagger.yaml
2019-06-05 13:13:59 +02:00
Sebastiaan van Stijn
55ad894d63
Merge pull request #39320 from microsoft/jjh/39290alternate
Windows: Don't attempt detach VHD for R/O layers
2019-06-05 12:25:40 +02:00
zhangyue
a4f828cb89 fix: fix lack of copyUIDGID in swagger.yaml
Signed-off-by: Zhang Yue <zy675793960@yeah.net>
Signed-off-by: zhangyue <zy675793960@yeah.net>
2019-06-05 09:58:04 +08:00
John Howard
293c74ba79 Windows: Don't attempt detach VHD for R/O layers
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-06-04 13:38:52 -07:00