Commit Graph

38138 Commits

Author SHA1 Message Date
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
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
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
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
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
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
40bd542277 internal: testutil: add DevZero helper
This helper acts like /dev/zero (outputs \x00 indefinitely) in an
OS-independent fashion. This ensures we don't need to special-case
around Windows in tests that want to open /dev/zero.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 2f8d3e1c33f77187c68893803018756d43daff15)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-11-07 14:27:58 -08:00
341aec8bb0 vendor: update to github.com/vbatts/tar-split@v0.10.2
Update to the latest version of tar-split, which includes a change to
fix a memory exhaustion issue where a malformed image could cause the
Docker daemon to crash.

  * tar: asm: store padding in chunks to avoid memory exhaustion

Fixes: CVE-2017-14992
Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit e0ff7cccc3cac73da41ec9ef007b0e4e97c55d01)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-11-07 14:27:54 -08:00
51ab500b6c Add /proc/scsi to masked paths
This is writeable, and can be used to remove devices. Containers do
not need to know about scsi devices.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit a21ecdf3c8a343a7c94e4c4d01b178c87ca7aaa1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-06 14:00:32 +01:00
afdb6d44a8 Merge pull request #253 from andrewhsu/v
[17.09] bump version 17.09.0-ce
v17.09.0-ce
2017-09-26 15:24:58 -07:00
3b0f381088 Merge pull request #252 from andrewhsu/cl
[17.09] update changelog for 17.09.0-ce release
2017-09-26 15:24:36 -07:00
09d58a6cc0 update changelog for 17.09.0-ce release
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-09-26 15:21:58 -07:00
8056485bad bump version 17.09.0-ce
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-09-22 09:13:41 -07:00
81cc2b36fa builder: fix config leakage on shared parent stage
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-09-21 13:22:44 -07:00
2357fb28b5 Merge pull request #243 from andrewhsu/rc3
[17.09] bump version to 17.09.0-ce-rc3
v17.09.0-ce-rc3
2017-09-20 18:12:40 -07:00
9661f00ed4 Merge pull request #244 from andrewhsu/cl
[17.09] update changelog for 17.09.0-ce-rc3
2017-09-20 18:12:19 -07:00
db97c3db91 Merge pull request #249 from andrewhsu/hcsshim
[17.09] vndr Microsoft/hcsshim to v0.6.5
2017-09-20 17:47:21 -07:00
fe19ba678a Merge pull request #239 from thaJeztah/17.09-fix-relabel-config-files
[17.09] Relabel config files.
2017-09-20 17:36:02 -07:00
d86b81fcce Merge pull request #247 from thaJeztah/17.09-may_detach_mount
[17.09] back port Automatically set `may_detach_mounts=1` on startup
2017-09-20 17:24:41 -07:00
0a7586971f Merge pull request #245 from thaJeztah/17.09-close_overlay2_pipe
[17.09] back port Close pipe if mountFrom failed.
2017-09-20 17:20:25 -07:00
5fd57722d1 Merge pull request #233 from thaJeztah/backport-fixed-raw-splunk-logger
[17.09] Fixed `raw` mode splunk logger
2017-09-20 17:18:18 -07:00
4856a9ec15 Merge pull request #242 from vieux/bump_swarmkit_vendor
[17.09] vndr docker/swarmkit to dcd1f2d for snapshot size fix
2017-09-20 17:13:43 -07:00
6a80ba3b8a Merge pull request #241 from thaJeztah/17.09-fix_selinux_with_mount_api
[17.09] Set selinux label on local volumes from mounts API
2017-09-20 17:09:11 -07:00
508a2630a3 Merge pull request #236 from thaJeztah/17.09-fix-secrets-and-configs-idempotence
[17.09] sort secrets and configs to ensure idempotence
2017-09-20 17:08:07 -07:00
1ae6ae93c4 Merge pull request #231 from thaJeztah/backport-remove-cors-headers-flag
[17.09] Backport remove cors headers flag
2017-09-20 17:07:44 -07:00
ccdf90d524 Merge pull request #237 from thaJeztah/17.09-more-yaml-information
[17.09] Add more information to the generated YAML for documentation
2017-09-20 16:33:29 -07:00
79ca5680b8 Merge pull request #232 from thaJeztah/backport-fix-system-df
[17.09] Fix variable shadowing causing LayersSize to be reported as 0
2017-09-20 13:56:23 -07:00
1f4bf6c347 vndr Microsoft/hcsshim to v0.6.5
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-09-20 13:16:35 -07:00
0f16d9b90a Automatically set may_detach_mounts=1 on startup
This is kernel config available in RHEL7.4 based kernels that enables
mountpoint removal where the mountpoint exists in other namespaces.
In particular this is important for making this pattern work:

```
umount -l /some/path
rm -r /some/path
```

Where `/some/path` exists in another mount namespace.
Setting this value will prevent `device or resource busy` errors when
attempting to the removal of `/some/path` in the example.

This setting is the default, and non-configurable, on upstream kernels
since 3.15.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 83c2152de503012195bd26069fd8fbd2dea4b32f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-09-20 20:35:33 +02:00
a825d7bfdf Close pipe if mountFrom failed.
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
(cherry picked from commit 9f38923901352459bb621d0b3587a6517e67eeb3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-09-20 19:32:44 +02:00
af4a1fc87e update changelog for 17.09.0-ce-rc3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-09-19 20:34:25 -07:00
a7f4500a2c bump version to 17.09.0-ce-rc3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-09-19 20:31:48 -07:00
5fb8e37ec7 bump swarmkit to dcd1f2d56afc08827d060fdb8ad222b00b1b6000
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-09-19 16:53:46 -07:00
da6e49e1f7 Set selinux label on local volumes from mounts API
When using a volume via the `Binds` API, a shared selinux label is
automatically set.
The `Mounts` API is not setting this, which makes volumes specified via
the mounts API useless when selinux is enabled.

This fix adopts the same selinux label for volumes on the mounts API as on
binds.
Note in the case of both the `Binds` API and the `Mounts` API, the
selinux label is only applied when the volume driver is the `local`
driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 5bbf5cc671ec8007bf8e0416799fff01d6a79b7e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-09-19 21:57:56 +02:00