Commit graph

33910 commits

Author SHA1 Message Date
Simon Ferquel
e6bfe9cdcb Added validation of isolation settings on daemon.verifyContainerSettings
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-11-20 10:34:20 +01:00
Sebastiaan van Stijn
b4fbcd80c7
Merge pull request #35465 from cpuguy83/update_containerd
Update containerd to v1 beta3
2017-11-14 14:01:48 +01:00
Vincent Demeester
1c99bc481b
Merge pull request #35484 from tonistiigi/clear-state
libcontainerd: fix leaking container/exec state
2017-11-14 11:15:30 +01:00
Vincent Demeester
f70c715be0
Merge pull request #35316 from kolyshkin/facepalm
Fix honoring tmpfs-size for user /dev/shm mount
2017-11-14 11:13:59 +01:00
Vincent Demeester
f520822453
Merge pull request #35456 from dnephin/make-runconfig-copy-deep
[Builder] Make copyRunConfig deep copy
2017-11-14 11:12:26 +01:00
Kir Kolyshkin
2e0a98b605 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>
2017-11-13 22:08:23 -08:00
Tonis Tiigi
6c4ce7cb6c libcontainerd: fix leaking container/exec state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-13 15:48:21 -08:00
Daniel Nephin
9bcd5d2574 Add deepCopyRunConfig for copying buidler runConfig
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-11-13 14:51:17 -05:00
Sebastiaan van Stijn
aea31ab242
Merge pull request #35473 from charrywanganthony/rm_stringutils
Split and remove pkg/stringutils
2017-11-13 18:10:32 +01:00
Brian Goff
af248a3fe0 Bump runc vendor
Updates runc to b2567b37d7b75eb4cf325b77297b140ea686ce8f which removes
some cross-repo dependencies.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-13 08:57:09 -05:00
Vincent Demeester
d5b9da206a
Merge pull request #35470 from thaJeztah/error-on-duplicate-labels
Remove deprecated support for duplicate label-keys
2017-11-13 10:57:28 +01:00
Kir Kolyshkin
31d30a985d Fix user mount /dev/shm size
Commit 7120976d74 ("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>
2017-11-12 21:42:59 -08:00
Chao Wang
97e406678c Split and remove pkg/stringutils
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com>
2017-11-13 10:01:11 +08:00
Sebastiaan van Stijn
8c6322338c
Remove deprecated support for duplicate label-keys
Support for duplicate labels (but different values) was
deprecated in commit e4c9079d09
(Docker 1.13), and scheduled for removal in 17.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-12 03:11:37 +01:00
Brian Goff
d3f934e304 Update containerd to v1 beta3
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-10 15:44:10 -05:00
Yong Tang
97be2a0752
Merge pull request #35342 from charrywanganthony/inslice
Copy Inslice() to those parts that use it
2017-11-10 07:26:42 -08:00
Chao Wang
5c154cfac8 Copy Inslice() to those parts that use it
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com>
2017-11-10 13:42:38 +08:00
Yong Tang
dc90c3047e
Merge pull request #35453 from cpuguy83/update_fsnotify
Update fsnotify to fix deadlock in removing watch
2017-11-09 18:29:31 -08:00
Akihiro Suda
45e9630b48
Merge pull request #35454 from cpuguy83/move_env_declaration
COPY should be the last op in the Dockerfile
2017-11-10 10:17:21 +09:00
Brian Goff
503b03a3f0 COPY should be the last op in the Dockerfile
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-09 16:00:28 -05:00
Brian Goff
e8aa22645b Update fsnotify to fix deadlock in removing watch
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-09 15:17:22 -05:00
Yong Tang
a4bdb304e2
Merge pull request #35250 from joppich/patch-1
Update names-generator.go
2017-11-09 06:21:02 -08:00
Yong Tang
d4239a6e28
Merge pull request #35442 from Microsoft/jjh/sysfirmware
Don't special case /sys/firmware in masked paths
2017-11-08 20:02:01 -08:00
John Stephens
72e179aa04
Merge pull request #35073 from mle-ii/master
Add gelf log driver plugin to Windows build
2017-11-08 14:53:56 -08:00
Sebastiaan van Stijn
9cd6ce18af
Merge pull request #35427 from sjeeva/master
fixed special character
2017-11-08 23:36:01 +01:00
John Howard
b023a46a07 Don't special case /sys/firmware in masked paths
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-11-08 12:10:42 -08:00
Jeeva S. Chelladhurai
a21654c34b fixed special character
`scope`=<string> local or swarm had special character, which was breaking the Swagger UI

Signed-off-by: Jeeva S. Chelladhurai <sjeeva@gmail.com>
2017-11-08 19:17:24 +00:00
Vincent Demeester
bbc4f78ba9
Merge pull request #34573 from cyphar/dm-dos-prevention-remove-mountpoint
devicemapper: remove container rootfs mountPath after umount
2017-11-08 17:08:07 +01:00
Akihiro Suda
f4d4f58631
Merge pull request #35423 from thaJeztah/bump-image-spec
Bump opencontainers/image-spec to v1.0.0
2017-11-08 09:37:16 +09:00
Aleksa Sarai
1af8ea681f
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>
2017-11-08 11:02:11 +11:00
Sebastiaan van Stijn
bd8ed57506
Merge pull request #35424 from cyphar/tar-split-cve_2017_14992
vendor: update to github.com/vbatts/tar-split@v0.10.2
2017-11-07 23:09:38 +01:00
Aleksa Sarai
0a13f827a1
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>
2017-11-08 05:37:52 +11:00
Victor Vieux
5745a8531e
Merge pull request #35265 from cpuguy83/32609_defreference_voldriver_on_error
Fixup some issues with plugin refcounting
2017-11-07 09:47:07 -08:00
Aleksa Sarai
2f8d3e1c33
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>
2017-11-08 03:45:55 +11:00
John Howard
2f22f64d55
Merge pull request #35419 from johnstep/handle-scratch-image-os
Set OS on scratch image and prevent panic if empty
2017-11-07 08:32:27 -08:00
Aleksa Sarai
e0ff7cccc3
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>
2017-11-08 02:50:52 +11:00
Sebastiaan van Stijn
c5ccc7f73f
Bump opencontainers/image-spec to v1.0.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-07 16:16:09 +01:00
Yong Tang
eec662bbee
Merge pull request #35326 from RenaudWasTaken/swarmkit-revendored
Revendored Swarmkit
2017-11-07 06:56:15 -08:00
John Stephens
a97817b673
Set OS on scratch image and prevent panic if empty
Signed-off-by: John Stephens <johnstep@docker.com>
2017-11-06 18:22:15 -08:00
Renaud Gaubert
734346a37e Added NodeGenericResource config tests
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
2017-11-06 21:47:26 +01:00
Renaud Gaubert
ebe14310b7 Updated GenericResource CLI
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
2017-11-06 21:47:26 +01:00
Brian Goff
b00b1b1c40
Merge pull request #35398 from thaJeztah/fix-api-version-for-until-option
Move "until" option to correct API version
2017-11-05 07:23:42 -05:00
Sebastiaan van Stijn
ee21669f53
Merge pull request #35394 from chris-crone/e2e-add-headers
Add missing headers for e2e test image build
2017-11-05 09:50:54 +01:00
Yong Tang
edaba571ba
Merge pull request #34162 from cpuguy83/move_logread_logic
Move jsonlog read logic
2017-11-04 13:53:36 -07:00
Yong Tang
48694a3f88
Merge pull request #35244 from joyce/joyce/todo-fixes
fix todo for printing error messages
2017-11-04 13:52:45 -07:00
Brian Goff
16f7cd6749 Move json log reading into log file object
This allows much of the read logic to be shared for other things,
especially for the new log driver proposed in
https://github.com/moby/moby/issues/33475

The only logic for reads in the json logger is around decoding log
messages, which gets passed into the log file object.

This also helps with implementing compression as it allows us to
simplify locking strategies.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-04 08:31:58 -04:00
Brian Goff
52d82b4fbc Refactor log file writer
Make the `*RotateFileWriter` specifically about writing
`logger.Message`'s, which is what it's used for.

This allows for future changes where the log writer can cache details
about log entries such as (e.g.) the timestamps included in a particular
log file, which can be used to optimize reads.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-04 08:15:20 -04:00
Sebastiaan van Stijn
2c1043c913
Merge pull request #35404 from tonistiigi/stream-ctx-fix
builder: fix long stream sync
2017-11-04 01:07:06 +01:00
Tonis Tiigi
c6703b722e builder: fix long stream sync
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-11-03 12:53:17 -07:00
Yong Tang
a8cefcf6af
Merge pull request #35399 from justincormack/mask-scsi
Add /proc/scsi to masked paths
2017-11-03 11:58:20 -07:00