Commit Graph

33937 Commits

Author SHA1 Message Date
69bca6d97b container.NetworkMounts(): don't lookup mounts twice
The code in question looks up mounts two times: first by using
HasMountFor(), and then directly by looking in container.MountPoints.
There is no need to do it twice.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: eab3ac3e70a510b97f9399efd13e3dc01a07c413
Component: engine
2017-11-20 18:48:27 -08:00
3cf67e0ba5 Merge pull request #35517 from stevvooe/protect-the-health-status
container: protect the health status with mutex
Upstream-commit: 9de84a78d76ed2ffe386fe21466f7401cf5d2e9d
Component: engine
2017-11-20 21:51:47 +01:00
325141c0ef Merge pull request #35495 from simonferquel/isolation-validation
Added validation of isolation settings on daemon.verifyContainerSettings
Upstream-commit: a9aeb18a0996eed4b3402ba0431269d46f5ad497
Component: engine
2017-11-20 12:09:40 -08:00
454988ca17 Merge pull request #35542 from masaeedu/patch-1
Fix consumes MIME type for NetworkConnect
Upstream-commit: 4f4a0279084921756d2b2157ad272610d7adc0ae
Component: engine
2017-11-20 18:13:26 +01:00
38076c34e8 Added validation of isolation settings on daemon.verifyContainerSettings
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: e6bfe9cdcb32e97f38b53781eb1f9d7bd2ef5971
Component: engine
2017-11-20 10:34:20 +01:00
be9497fbf4 Fix consumes MIME type for NetworkConnect
This route expects `application/json`. Sending a content type header of `application/octet-stream` results in an error.

Signed-off-by: Asad Saeeduddin <masaeedu@gmail.com>
Upstream-commit: 876b32861789a0424557c640622bde47eedd2d98
Component: engine
2017-11-18 22:34:23 -05:00
23f0e9211c Merge pull request #35522 from kolyshkin/gd-custom
graphdriver: custom build-time priority list
Upstream-commit: edc204b1ffd53252649917fe54daa0b8419ed4ec
Component: engine
2017-11-17 15:48:26 -08:00
e533bd8d7a Merge pull request #35526 from brauner/2017-11-16/docker_xfs_quota_userns
skip xfs quota tests when running in user namespace
Upstream-commit: 8124d21d2ad7666e73551fcc317c109c6a02e122
Component: engine
2017-11-17 13:41:58 -05:00
94aae8ab65 Skip further checks for quota in user namespaces
Commit 7a1618ced359a3ac921d8a05903d62f544ff17d0 regresses running Docker
in user namespaces. The new check for whether quota are supported calls
NewControl() which in turn calls makeBackingFsDev() which tries to
mknod(). Skip quota tests when we detect that we are running in a user
namespace and return ErrQuotaNotSupported to the caller. This just
restores the status quo.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Upstream-commit: 7e35df0e0484118740dbf01e7db9b482a1827ef1
Component: engine
2017-11-17 12:57:27 +01:00
0db60dff81 graphdriver: custom build-time priority list
Add a way to specify a custom graphdriver priority list
during build. This can be done with something like

  go build -ldflags "-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper"

As ldflags are already used by the engine build process, and it seems
that only one (last) `-ldflags` argument is taken into account by go,
an envoronment variable `DOCKER_LDFLAGS` is introduced in order to
be able to append some text to `-ldflags`. With this in place,
using the feature becomes

  make DOCKER_LDFLAGS="-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper" dynbinary

The idea behind this is, the priority list might be different
for different distros, so vendors are now able to change it
without patching the source code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 17708e72a7ef29fb1d4b03fbded1c5e4c08105fd
Component: engine
2017-11-16 19:43:34 -08:00
a1c54edb95 container: protect the health status with mutex
Adds a mutex to protect the status, as well. When running the race
detector with the unit test, we can see that the Status field is written
without holding this lock. Adding a mutex to read and set status
addresses the issue.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 7db30ab0cdf072956d2ceda833b7de22fe17655c
Component: engine
2017-11-16 15:04:01 -08:00
42bb16a0de Merge pull request #35512 from cpuguy83/replace_plugun_integration_with_unit
Replace vol plugin integration test w/ unit test
Upstream-commit: ab90bc296155f341f8315a265b3c6d8112512db2
Component: engine
2017-11-16 17:35:23 +01:00
9ef2726179 Replace vol plugin integration test w/ unit test
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 00d801dd85b486eb46eff7bd041c33f04e373699
Component: engine
2017-11-15 13:13:22 -05:00
8771152e42 Merge pull request #35429 from dnephin/build-fails-on-long-label
Fix dockerfile parser failing silently on long tokens
Upstream-commit: 7c53e732530642f817c83e1ad303f8f9f7018def
Component: engine
2017-11-15 18:48:50 +01:00
cffc0c967c Merge pull request #35492 from thaJeztah/bump-docker-py
Bump docker-py to 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a
Upstream-commit: a5c679baf66488e89ccf93c2282b96673acbcb0e
Component: engine
2017-11-15 07:31:14 -08:00
55c5f024c9 Merge pull request #35504 from kolyshkin/sep-o2
daemon/graphdriver/register: separate overlay2
Upstream-commit: fa1054843f9a8a32ca33be6b73167069a8344ecf
Component: engine
2017-11-15 09:21:08 -05:00
3647d18f55 Merge pull request #35499 from cpuguy83/erroneous_errors
Cancelation errors should not be logged
Upstream-commit: 7c16e4d41769bcedfd987507ac150f516358a120
Component: engine
2017-11-15 11:34:28 +01:00
ce594a83b1 daemon/graphdriver/register: separate overlay2
Make it possible to disable overlay and overlay2 separately.

With this commit, we now have `exclude_graphdriver_overlay` and
`exclude_graphdriver_overlay2` build tags for the engine, which
is in line with any other graph driver.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d014be5426c869d429c1a11cad9e76321dd7a326
Component: engine
2017-11-15 00:06:00 -08:00
ae3d074947 Cancelation errors should not be logged
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b86746d60d4c43dcadd3b95fc4b2da7c03323d84
Component: engine
2017-11-14 20:32:20 -05:00
005014677c Merge pull request #34896 from cpuguy83/store_labels_when_exists
Create labels when volume exists only remotely
Upstream-commit: f62aeae97791b4c2318791a9b621d7da4c17ac32
Component: engine
2017-11-14 17:05:40 -08:00
6ad432f442 Merge pull request #35482 from stevvooe/protect-health-monitor-channel
container: protect health monitor channel
Upstream-commit: e4d0fe84f9ea88b0e0cfd847412c9f29442cc62d
Component: engine
2017-11-14 11:25:14 -08:00
4bd3446b2b Merge pull request #35231 from sargun/add-vfs-quota-support
Add vfs quota support
Upstream-commit: 0defc6981322e16863e068f99b98326394b8cbd0
Component: engine
2017-11-14 15:05:02 +00:00
d8cda430a7 Bump docker-py to 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d1a0773d3a834a4bfa98deb07ae3f87dd6438da6
Component: engine
2017-11-14 14:17:44 +01:00
15db98f6fa Merge pull request #35465 from cpuguy83/update_containerd
Update containerd to v1 beta3
Upstream-commit: b4fbcd80c796f384eba800d1dc89892ab77c58e5
Component: engine
2017-11-14 14:01:48 +01:00
2cc0ade7cc Merge pull request #35484 from tonistiigi/clear-state
libcontainerd: fix leaking container/exec state
Upstream-commit: 1c99bc481be6abf40d4fd287d1b6634a6108a211
Component: engine
2017-11-14 11:15:30 +01:00
6f6f835501 Merge pull request #35316 from kolyshkin/facepalm
Fix honoring tmpfs-size for user /dev/shm mount
Upstream-commit: f70c715be01f5d5f4a8be4ab1b2c6e1464b478a7
Component: engine
2017-11-14 11:13:59 +01:00
523ff46adb Merge pull request #35456 from dnephin/make-runconfig-copy-deep
[Builder] Make copyRunConfig deep copy
Upstream-commit: f520822453a01673f38ed6b0ce86c52d71e43a0d
Component: engine
2017-11-14 11:12:26 +01:00
31c1f92623 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>
Upstream-commit: 2e0a98b605fa278ee1f348c68fe7e07aed57b834
Component: engine
2017-11-13 22:08:23 -08:00
ce5c429be8 libcontainerd: fix leaking container/exec state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6c4ce7cb6c62fb82ed2db1d4ee3a02bc5148cdee
Component: engine
2017-11-13 15:48:21 -08:00
10c7697134 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>
Upstream-commit: 5b55747a523671fa6e626848060460a48d058451
Component: engine
2017-11-13 13:31:28 -08:00
60d1b81b0d Add deepCopyRunConfig for copying buidler runConfig
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9bcd5d2574fe0c84542d2fa18232c34e2a9c0cac
Component: engine
2017-11-13 14:51:17 -05:00
6a81f7db2e Merge pull request #35473 from charrywanganthony/rm_stringutils
Split and remove pkg/stringutils
Upstream-commit: aea31ab242a1e5f489f1597a726267ed190a3095
Component: engine
2017-11-13 18:10:32 +01:00
628966a8d4 Bump runc vendor
Updates runc to b2567b37d7b75eb4cf325b77297b140ea686ce8f which removes
some cross-repo dependencies.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: af248a3fe087805907e4b69ab017ef60d44ce093
Component: engine
2017-11-13 08:57:09 -05:00
ca631a390a Merge pull request #35470 from thaJeztah/error-on-duplicate-labels
Remove deprecated support for duplicate label-keys
Upstream-commit: d5b9da206ae57255d8de490a7db8eb3ddbb590bd
Component: engine
2017-11-13 10:57:28 +01:00
f9f5db27c1 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>
Upstream-commit: 31d30a985d99a0eef92116a22159727f5c332784
Component: engine
2017-11-12 21:42:59 -08:00
8369aeca8e Split and remove pkg/stringutils
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com>
Upstream-commit: 97e406678c8d695ee6eaefce41b83e9e27e239c7
Component: engine
2017-11-13 10:01:11 +08:00
aa1c9fab4f Remove deprecated support for duplicate label-keys
Support for duplicate labels (but different values) was
deprecated in commit e4c9079d091a2eeac8a74a0356e3f348db873b87
(Docker 1.13), and scheduled for removal in 17.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8c6322338c91cdb88b1fef4def393d9a7b670366
Component: engine
2017-11-12 03:11:37 +01:00
9379e66070 Update containerd to v1 beta3
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d3f934e304d78296e606d6e3a2ca523d249e954c
Component: engine
2017-11-10 15:44:10 -05:00
d94b0d4775 Merge pull request #35342 from charrywanganthony/inslice
Copy Inslice() to those parts that use it
Upstream-commit: 97be2a075225945ca7b92d75f85048cfd05a3a71
Component: engine
2017-11-10 07:26:42 -08:00
98da414257 Copy Inslice() to those parts that use it
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com>
Upstream-commit: 5c154cfac89305f7ca9446854e56700e8a660f93
Component: engine
2017-11-10 13:42:38 +08:00
32672a8e2b Merge pull request #35453 from cpuguy83/update_fsnotify
Update fsnotify to fix deadlock in removing watch
Upstream-commit: dc90c3047e1cc59770395ded86128305e3d24543
Component: engine
2017-11-09 18:29:31 -08:00
8d5384d97c Merge pull request #35454 from cpuguy83/move_env_declaration
COPY should be the last op in the Dockerfile
Upstream-commit: 45e9630b48b99ab86a88dd9a593604810b8400b6
Component: engine
2017-11-10 10:17:21 +09:00
366ab9966c COPY should be the last op in the Dockerfile
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 503b03a3f090550052af960ece2e71d54c1fdf0e
Component: engine
2017-11-09 16:00:28 -05:00
2f7df6c0dd Update fsnotify to fix deadlock in removing watch
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e8aa22645baf8f8254cc435e772314d4a5dee92c
Component: engine
2017-11-09 15:17:22 -05:00
7918ee610f Create labels when volume exists only remotely
Before this, if a volume exists in a driver but not in the local cache,
the store would just return a bare volume. This means that if a user
supplied options or labels, they will not get stored.

Instead only return early if we have the volume stored locally. Note
this could still have an issue with labels/opts passed in by the user
differing from what is stored, however this isn't really a new problem.

This fixes a problem where if there is a shared storage backend between
two docker nodes, a create on one node will have labels stored and a
create on the other node will not.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4d8598ad0506b29c12632c1b8ed92eb58fc2f0e2
Component: engine
2017-11-09 15:14:06 -05:00
84fe2b7d9a Fix remote build target as Dockerfile
The test was passing previously because the preamble was already buffered. After
the change to return Scanner.Err() the final read error on the buffer was no
longer being ignored.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a74cc833450dfc48cc95b2b109cbcb24feff4929
Component: engine
2017-11-09 15:05:26 -05:00
ca892e4f1a Fix dockerfile parser failing silently on long tokens
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 59ad3a36e2684bd36a4b02179949bd17f1406918
Component: engine
2017-11-09 15:03:20 -05:00
2bb50cbf78 Merge pull request #35250 from joppich/patch-1
Update names-generator.go
Upstream-commit: a4bdb304e29f21661e8ef398dbaeb8188aa0f46a
Component: engine
2017-11-09 06:21:02 -08:00
c716c066e5 Merge pull request #35442 from Microsoft/jjh/sysfirmware
Don't special case /sys/firmware in masked paths
Upstream-commit: d4239a6e286f546f5eda507437f643b5a1548c5d
Component: engine
2017-11-08 20:02:01 -08:00
bcc50083eb Merge pull request #35073 from mle-ii/master
Add gelf log driver plugin to Windows build
Upstream-commit: 72e179aa04999c141db96688adabfe5bcdac8293
Component: engine
2017-11-08 14:53:56 -08:00