Commit Graph

38166 Commits

Author SHA1 Message Date
19e2cf6259 Merge pull request #338 from seemethere/bump_ver_17_09_1
[17.09] bump version to 17.09.1-ce
v17.09.1-ce
2017-12-07 14:19:00 -08:00
e61ea94fd9 Merge pull request #339 from docker/c9
[17.09] update changelog for 17.09.1-ce
2017-12-07 14:18:24 -08:00
e48debf9de update changelog for 17.09.1-ce
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-12-07 14:12:47 -08:00
d23d227d35 bump version to 17.09.1-ce
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-12-07 22:04:54 +00:00
2d63290f4b Merge pull request #302 from andrewhsu/v9
[17.09] bump version to 17.09.1-ce-rc1
v17.09.1-ce-rc1
2017-11-30 15:11:11 -08:00
bef07a1ce4 Merge pull request #301 from andrewhsu/c9
[17.09] update changelog for 17.09.1-ce-rc1
2017-11-30 15:10:54 -08:00
5f5660fc44 update changelog for 17.09.1-ce-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2017-11-30 15:06:01 -08:00
d69695aaf1 Merge pull request #312 from thaJeztah/17.09-backport-fix-version-on-failure
[17.09] Set APIVersion on the client, even when Ping fails
2017-11-30 14:03:51 -08:00
3f7bf4e845 Merge pull request #330 from thaJeztah/17.09-backport-cli-version
[17.09] Fix version comparison when negotiating the the API version
2017-11-30 13:58:42 -08:00
0ca354c767 Merge pull request #319 from thaJeztah/17.09-backport-dm-dos-prevention-remove-mountpoint
[17.09] backport dm dos prevention remove mountpoint
2017-11-30 12:48:38 -08:00
b3f86e3d0f Merge pull request #326 from kolyshkin/backport-353516-17.09
[17.09] Fix honoring tmpfs-size for user /dev/shm mount
2017-11-30 12:47:02 -08:00
c24589548f Merge pull request #331 from thaJeztah/17.09-backport-fix-net-not-found
[17.09] Restore error type in FindNetwork
2017-11-30 12:44:32 -08:00
6b4f347ab9 Merge pull request #317 from thaJeztah/17.09-backport-for_linux_126_dont_abort
[17.09] Don't abort when setting may_detach_mounts
2017-11-29 19:31:10 -08:00
c3be82eb0a Restore error type in FindNetwork
The error type libnetwork.ErrNoSuchNetwork is used in the controller
to retry the network creation as a managed network though the manager.
The change of the type was breaking the logic causing the network to
not being created anymore so that no new container on that network
was able to be launched
Added unit test

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
(cherry picked from commit 51cea0a53c2fd36832277402e9faac81bfb4abd4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-29 16:48:04 -08:00
bea7b88e4b Override github.com/docker/docker in vendor.conf
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-29 15:54:49 -08:00
7da03c8e7c Fix version comparison when negotiating the the API version
Signed-off-by: Yu-Ju Hong <yjhong@google.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-29 15:53:01 -08:00
93c8cd4a54 Fix version comparison when negotiating the the API version
Signed-off-by: Yu-Ju Hong <yjhong@google.com>
(cherry picked from commit 4b6ec10b07c14e7fff1cc51156b6d954147f826f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-29 15:46:50 -08:00
bb351b1f19 Merge pull request #315 from thaJeztah/17.09-backport-dont-warn-for-comment-only-lines
[17.09] Warn on empty continuation lines only, not for comments
2017-11-29 14:23:56 -08:00
de00d5a407 Merge pull request #314 from thaJeztah/17.09-backport-fix_chroot_mount_race
[17.09] Use rslave instead of rprivate in chrootarchive
2017-11-29 14:16:17 -08:00
d102cb2dd5 Merge pull request #251 from tonistiigi/fix-config-leak
[17.09] builder: fix config leakage on shared parent stage
2017-11-29 14:06:50 -08:00
e68f903cfc Merge pull request #318 from thaJeztah/17.09-backport-rlock-fix
[17.09] cluster: avoid recursive readlock on swarm info
2017-11-29 14:05:13 -08:00
ff664c00db Merge pull request #327 from johnstep/windows-manifest-lists
[17.09] Backport version fix for Windows manifest lists
2017-11-29 14:00:08 -08:00
c4124d0875 Merge pull request #328 from andrewhsu/ln
[17.09] bump vndr of libnetwork to 690b4c0
2017-11-29 13:58:13 -08:00
e5b5086d0b Merge pull request #313 from thaJeztah/17.09-backport-protect-health-monitor-channel
[17.09] container: protect health monitor channel
2017-11-29 10:45:11 -08:00
61ee5a0623 Merge pull request #329 from andrewhsu/flake
[17.09] Avoid failing the test if container is already stopped
2017-11-29 10:06:22 -08:00
87f5f1d49c Avoid failing the test if container is already stopped
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
(cherry picked from commit adf75503dba2e782139173c011999eacd0c3d7e2)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-11-28 23:09:04 -08:00
79757e0860 Merge pull request #320 from tonistiigi/clean-exec-fifos
[17.09] libcontainerd: fix leaking container/exec state
2017-11-28 17:28:24 -08:00
56e2353034 Merge pull request #323 from jose-bigio/17.09_vendoring
[17.09] update swarmkit to b40ffde
2017-11-28 17:22:10 -08:00
9cef9a54e6 Merge pull request #300 from docker/backport_CVE2
[17.09] vendor: update to github.com/vbatts/tar-split@v0.10.2
2017-11-28 17:10:37 -08:00
3fbf1fbd82 bump vndr of libnetwork to 690b4c0
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-11-28 15:06:32 -08:00
ceb3b42a7f update swarmkit to b40ffde
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2017-11-28 13:55:40 -08:00
9083769a6e Stop filtering Windows manifest lists by version
Signed-off-by: John Stephens <johnstep@docker.com>
(cherry picked from commit 8ed8f4a71d7e1a936fa077b4348b7375c81746a6)

Conflicts:
	components/engine/distribution/pull_v2_windows.go

Signed-off-by: John Stephens <johnstep@docker.com>
2017-11-20 13:18:50 -08:00
21e53b4643 Add support for Windows version filtering on pull
Update logic to choose manifest from manifest list to check
for os version on Windows. Separate the logic for windows
and unix to keep unix logic the same.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit 38aef56e1fcb8ea318df98c89cf002267b88a136)
Signed-off-by: John Stephens <johnstep@docker.com>
2017-11-20 13:00:09 -08:00
3406769872 integration: test case for #35271
This test case is checking that the built-in default size for /dev/shm
(which is used for `--ipcmode` being `private` or `shareable`)
is not overriding the size of user-defined tmpfs mount for /dev/shm.

In other words, this is a regression test case for issue #35271,
https://github.com/moby/moby/issues/35271

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 2e0a98b605fa278ee1f348c68fe7e07aed57b834)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-11-17 19:23:34 -08:00
15e5af3a07 Fix user mount /dev/shm size
Commit 7120976d74195 ("Implement none, private, and shareable ipc
modes") introduces a bug: if a user-specified mount for /dev/shm
is provided, its size is overriden by value of ShmSize.

A reproducer is simple:

 docker run --rm
	--mount type=tmpfs,dst=/dev/shm,tmpfs-size=100K \
	alpine df /dev/shm

This commit is an attempt to fix the bug, as well as optimize things
a but and make the code easier to read.

https://github.com/moby/moby/issues/35271

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 31d30a985d99a0eef92116a22159727f5c332784)
2017-11-17 19:23:22 -08:00
f1bf9f2c5b integration-cli: add TestExecStateCleanup test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-17 12:20:43 -08:00
e02f35c1fc libcontainerd: remove fifos on docker exec failed
if docker exec failed to start, the fifo for exec will
left on system.
```
[root@centos-220 bcc8bc6a080eb859ecd193dc32ea4e1cd0080b070afb2a0259b3ed004aae155e]# docker exec -ti bcc8bc6a080e bash
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"bash\": executable file not found in $PATH"

[root@centos-220 bcc8bc6a080eb859ecd193dc32ea4e1cd0080b070afb2a0259b3ed004aae155e]# ls -l
total 4
prwx------. 1 root root    0 Apr 10 11:29 46889b0713827f708949af4f6b30315181e1d96e75ce179c949935ab02db2bd1-stdin
prwx------. 1 root root    0 Apr 10 11:29 46889b0713827f708949af4f6b30315181e1d96e75ce179c949935ab02db2bd1-stdout
prwx------. 1 root root    0 Apr  6 13:15 4dfc9806a2aef53f72a5d2854ff235714b5f064d10e29b5e59ff67d48a924462-stdin
prwx------. 1 root root    0 Apr  6 13:15 4dfc9806a2aef53f72a5d2854ff235714b5f064d10e29b5e59ff67d48a924462-stdout
prwx------. 1 root root    0 Apr  6 13:15 cc3af6845394cc60007b49242acd990b28988ef4ddaaa217a26caba1075ab343-stdin
prwx------. 1 root root    0 Apr  6 13:15 cc3af6845394cc60007b49242acd990b28988ef4ddaaa217a26caba1075ab343-stdout
-rw-r--r--. 1 root root 3353 Apr  6 13:12 config.json
prwx------. 1 root root    0 Apr  6 13:14 d35e637104991052261e3afeba96a86b3cc6392dae6bd2226812407c0b92a20c-stdin
prwx------. 1 root root    0 Apr  6 13:14 d35e637104991052261e3afeba96a86b3cc6392dae6bd2226812407c0b92a20c-stdout
prwx------. 1 root root    0 Apr  6 13:12 init-stdin
prwx------. 1 root root    0 Apr  6 13:12 init-stdout
```

Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 997ec06298081bf616177bf6fb102dc737b321ce)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-17 12:15:41 -08:00
b91a1041f6 devmapper: add a test for mount leak workaround
In order to avoid reverting our fix for mount leakage in devicemapper,
add a test which checks that devicemapper's Get() and Put() cycle can
survive having a command running in an rprivate mount propagation setup
in-between. While this is quite rudimentary, it should be sufficient.

We have to skip this test for pre-3.18 kernels.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 1af8ea681fba1935c60c11edbbe19b894c9b286f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 17:36:34 +01:00
b01ad4a8b6 devicemapper: remove container rootfs mountPath after umount
libdm currently has a fairly substantial DoS bug that makes certain
operations fail on a libdm device if the device has active references
through mountpoints. This is a significant problem with the advent of
mount namespaces and MS_PRIVATE, and can cause certain --volume mounts
to cause libdm to no longer be able to remove containers:

  % docker run -d --name testA busybox top
  % docker run -d --name testB -v /var/lib/docker:/docker busybox top
  % docker rm -f testA
  [fails on libdm with dm_task_run errors.]

This also solves the problem of unprivileged users being able to DoS
docker by using unprivileged mount namespaces to preseve mounts that
Docker has dropped.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 92e45b81e0a8b68d9567a2068247460a1ba59600)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 17:36:28 +01:00
e70eb02632 cluster: avoid recursive readlock on swarm info
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit ee1be71e9dc52db8a7ac951ba96f18a5c894806a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 17:33:20 +01:00
66cbbe22db Don't abort when setting may_detach_mounts
83c2152de503012195bd26069fd8fbd2dea4b32f sets the kernel param for
fs.may_detach_mounts, but this is not neccessary for the daemon to
operate. Instead of erroring out (and thus aborting startup) just log
the error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit c6a2044497e0e1ff61350859c8572a2c31c17ced)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 17:19:25 +01:00
338e914b20 Warn on empty continuation lines only, not for comments
Commit 8d1ae76dcbbb73d8e20c6a14a7d3fe2410b95f55 added
deprecation warnings for empty continuation lines,
but also treated comment-only lines as empty.

This patch distinguishes empty continuation lines
from comment-only lines, and only outputs warnings
for the former.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2fd736ac10c1c46d1001373d887cb99b3d8ee824)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 17:10:39 +01:00
6c6a1827cf Use rslave instead of rprivate in chrootarchive
With `rprivate` there exists a race where a reference to a mount has
propagated to the new namespace, when `rprivate` is set the parent
namespace is not able to remove the mount due to that reference.
With `rslave` unmounts will propagate correctly into the namespace and
prevent the sort of transient errors that are possible with `rprivate`.

This is a similar fix to 117c92745b

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 5ede64d63fec0b9d4cf921b6f8fb946e65287538)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 17:00:09 +01:00
030334d397 container: protect health monitor channel
While this code was likely called from a single thread before, we have
now seen panics, indicating that it could be called in parallel. This
change adds a mutex to protect opening and closing of the channel. There
may be another root cause associated with this panic, such as something
that led to the calling of this in parallel, as this code is old and we
had seen this condition until recently.

This fix is by no means a permanent fix. Typically, bugs like this
indicate misplaced channel ownership. In idiomatic uses, the channel
should have a particular "owner" that coordinates sending and closure.
In this case, the owner of the channel is unclear, so it gets opened
lazily. Synchronizing this access is a decent solution, but a refactor
may yield better results.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 5b55747a523671fa6e626848060460a48d058451)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 16:48:45 +01:00
b02a5e5084 Set APIVersion on the client, even when Ping fails
Refactor to support testing
Also add tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit e828efa4ab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-17 16:37:11 +01:00
8916204beb Merge pull request #291 from thaJeztah/17.09-backport-mask-scsi
[17.09] Add /proc/scsi to masked paths
2017-11-16 17:05:45 -08:00
a5694003b0 Merge pull request #303 from seemethere/fix_s390x_ppc64le_tests_1709
[17.09] fix p/z HubPullSuite tests
2017-11-10 09:33:06 -08:00
f9cf09436b [integration-cli] fix p/z HubPullSuite tests
This test tries to pull all the tags in the busybox repo and looks to see
if there were more than two images pulled. This was failing on
p/z due to the recent change to manifest lists, where one of the busybox
tags didn't have a p/z manifest in it's manifest list.

This error seems fine to me, so I changed the test to see if pull fails,
it fails with the "manifest not found" error.

Also switched from busybox -> alpine, because it has significantly less tags,
and the images are close in size.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit 5739ba1b918402b8eda748ac2f5dd7ce00f2e69f)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-11-09 19:19:46 +00:00
3fdbcd1680 bump version to 17.09.1-ce-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-11-07 16:24:18 -08:00
c480a40b85 image: add import test for CVE-2017-14992
To ensure that we don't revert CVE-2017-14992, add a test that is quite
similar to that upstream tar-split test (create an empty archive with
lots of junk and make sure the daemon doesn't crash).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 0a13f827a10d3bf61744d9b3f7165c5885a39c5d)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-11-07 14:28:02 -08:00