Commit Graph

32980 Commits

Author SHA1 Message Date
bfb65fa0bb Merge pull request #33830 from cpuguy83/33799_fix_plugin_mounts_issue
Make plugin removes more resilient to failure
Upstream-commit: 48adb9d9549b8e5c4e9fd34335161c7676395e5a
Component: engine
2017-07-03 18:37:31 -07:00
3fea46b7b2 Merge pull request #33884 from aaronlehmann/redact-secret-payload
middleware: Redact secret data on "secret create"
Upstream-commit: b9f248d0ea9f7ec4e0325c7034038319c70c2dda
Component: engine
2017-07-03 14:18:32 -07:00
63c7ce310a Merge pull request #33213 from gkze/master
GCP Logs: send log text as jsonPayload.message instead of jsonPayload.data
Upstream-commit: c2ad549533cf2ffdb8b93ce8eb0bad5c695b828c
Component: engine
2017-07-03 16:18:18 -04:00
2040dca50c Merge pull request #33405 from jsoref/gofmt
gofmt: 5 files
Upstream-commit: acd20d8a8ea6fe7d00e10d4946cc68c7162355bc
Component: engine
2017-07-03 13:06:10 -07:00
d174953fec Merge pull request #33843 from moypray/exit
Set unpaused state when receiving 'stateExit' event
Upstream-commit: f8f1a3ade97bf5c9fd96836e9a436b19ef5ac660
Component: engine
2017-07-03 16:02:18 -04:00
c2eb21415c gofmt: 5 files
gofmt from go1.8.3

hg locate '*.go' |xargs ~/go/bin/gofmt -s -w

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6284cf5e9a4bc121b73422c454cdbf8dc18f42f3
Component: engine
2017-07-03 10:32:47 -07:00
a2a898edc8 Merge pull request #33899 from cyphar/make-dynbinary
make: add dynbinary target
Upstream-commit: 8bc681262f970b243cb5e9796c47ecd8d6b6aabf
Component: engine
2017-07-03 17:50:20 +02:00
b0ff0a2e4a Merge pull request #33888 from thaJeztah/enable-version-negotiation
Always perform version-negotiation
Upstream-commit: 75a034621d715bf01069cc3f7bab0cce85fa744c
Component: engine
2017-07-03 17:46:35 +02:00
955a71e569 Merge pull request #33926 from coolljt0725/fix_wrong_file_mode
Fix wrong filemode for rotate log files
Upstream-commit: d061ad4a1b3b029e4afa042c1eaf707037562e8c
Component: engine
2017-07-03 17:45:14 +02:00
bd2899d4b2 Merge pull request #33908 from thaJeztah/carry-33883-ignore-nonexistent-containers
[carry 33883] daemon: Ignore nonexistent containers when listing containers
Upstream-commit: cab50de4d682890187b48984e0c81b98cb69ed4f
Component: engine
2017-07-03 17:06:54 +02:00
f8f582f303 Set unpasued state when receiving 'stateExit' event
Description:
 1. start a container with restart=always.
    `docker run -d --restart=always ubuntu sleep 3`
 2. container init process exits.
 3. use `docker pause <id>` to pause this container.

if the pause action is before cgroup data is removed and after the init process died.
`Pause` operation will success to write cgroup data, but actually do not freeze any process.

And then docker received pause event and stateExit event from
containerd, the docker state will be Running(paused), but the container
is free running.

Then we can not remove it, stop it , pause it  and unpause it.

Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
Upstream-commit: fe1b4cfba6320793373c5397641d743d9fe94cf8
Component: engine
2017-07-03 17:26:13 +08:00
0257839dba Merge pull request #33853 from vieux/report-2017-06-26
Moby Dev Report 2017 06 26
Upstream-commit: 714c226b431c73efa43373fb7a284408b709c80f
Component: engine
2017-07-03 11:18:11 +02:00
3a59ac4d9f Fix wrong filemode for rotate log files
the filemode should be 0640 but not 06400

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 96ea8eaa1592856e0829c3465e64f93911d3e389
Component: engine
2017-07-03 03:49:22 -04:00
155031dfee Merge pull request #33920 from thaJeztah/remove-fork-message
Remove comment about forked golang.org/x/net
Upstream-commit: 7117d5ef25b54c3384fbaf5cf279e0dcc6701a52
Component: engine
2017-07-02 00:29:30 -07:00
9787d41c94 Remove comment about forked golang.org/x/net
This dependency was temporarily forked, but
the fork was removed in db37a86d37431a1d82505cf6adc91a5d91dad146.

This patch removes the comment

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fe877c2b959b60d953ad4b2d3eeda377add575a5
Component: engine
2017-07-02 00:19:15 -07:00
c5ade3e304 daemon: Ignore nonexistent containers when listing containers
The name/ID relationships are maintained separately from the memdb and
can be out of sync from any particular memdb snapshot. If a container
does not exist in the memdb, we must accept this as normal and not fail
the listing. This is consistent with what the code used to do before
memdb was introduced.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d257a63fb6a2ad0c2369981914544add389917bf
Component: engine
2017-06-30 15:19:47 -07:00
27d204d888 make: add dynbinary target
Recently, it's become necessary to build dynbinaries on certain
distributions, so make it easier for users to build dynbinaries. It
looks like this was just an oversight when we added dynbinary builds.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: c81255c9c0314b81ab27f6afd7646cdd259e6495
Component: engine
2017-07-01 04:54:57 +10:00
8e86b3a04f Merge pull request #33875 from tmp6154/master
Change order of arguments in assertion to be more logical
Upstream-commit: 87df0e533b619c088091fd1e2310e92bb9a24822
Component: engine
2017-06-30 14:46:11 -04:00
6a2cd2eda7 Merge pull request #33890 from ripcurld0/nesting_fix
Refactor MountPoint Setup function in volume.go
Upstream-commit: 2b20737778ff27b6b08b30912378931271c14eb8
Component: engine
2017-06-30 14:40:50 -04:00
96548baff2 Merge pull request #33882 from aaronlehmann/memdb-no-container
container: Handle failed memdb lookups
Upstream-commit: 18d874a20fccbd017e91cfaad31861b0953e22fa
Component: engine
2017-06-30 14:31:10 -04:00
cccb3a2108 add dev report 2017-06-26
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 8b0384fd8918e82459aab037d50bca6394bbf781
Component: engine
2017-06-30 17:19:40 +02:00
ab5c937cf4 Merge pull request #33824 from ijc/build-iidfile-with-squash
builder: Emit a BuildResult after squashing.
Upstream-commit: b8766fe793c18149e167b8f9819352a3bfcb0514
Component: engine
2017-06-30 16:42:23 +02:00
7e46ec7067 Make plugin removes more resilient to failure
Before this patch, if the plugin's `config.json` is successfully removed
but the main plugin state dir could not be removed for some reason (e.g.
leaked mount), it will prevent the daemon from being able to be
restarted.

This patches changes this to atomically remove the plugin such that on
daemon restart we can detect that there was an error and re-try. It also
changes the logic so that it only logs errors on restore rather than
erroring out the daemon.

This also removes some code which is now duplicated elsewhere.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 11cf394e5ea964636294a219872b188fe5bdf4dd
Component: engine
2017-06-30 09:58:19 -04:00
8d232fdb68 Refactor MountPoint Setup function in volume.go
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: fb8b27cd41c92c9a739be70dee11f6e6ffffafdf
Component: engine
2017-06-30 11:09:49 +03:00
1a311235ba Always perform version-negotiation
If a client is initialized without a specific
version set, version negotiation would not be
functional.

This patch changes the behavior to always
perform version negotation (if called), in
which case the "current" (maximum supported
API version) is used as a default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5975dc4b4b8a6fa2e0edd1f1b113e7f66dad732b
Component: engine
2017-06-29 22:24:49 -07:00
60185c5eb3 container: Handle failed memdb lookups
If a container doesn't exist in the memdb, First will return nil, not an
error. This should be checked for before using the result.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c26b0cdfd1a026af88fcfbed9d3c3acdd6d171a0
Component: engine
2017-06-29 16:33:30 -07:00
c71c867f51 middleware: Redact secret data on "secret create"
With debug logging turned on, we currently log the base64-encoded secret
payload.

Change the middleware code to redact this. Since the field is called
"Data", it requires some context-sensitivity. The URI path is examined
to see which route is being invoked.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3fbc352cbbce06cd3001d6b14b2b1ebcb4d42cd5
Component: engine
2017-06-29 16:04:47 -07:00
2f46157f44 Merge pull request #33873 from lixiaobing1/masterissue
update url for issue
Upstream-commit: 82390ebf32c3e48d80b862ffe46d4160aa65b728
Component: engine
2017-06-29 13:48:19 -07:00
e0679f41e0 Merge pull request #33827 from cpuguy83/return_ping_data_if_available
Set ping version even on error
Upstream-commit: 654bb6368b838bc619a5d612a39abb385fbd45c3
Component: engine
2017-06-29 12:27:23 -07:00
85421deb82 Set ping version even on error
In some cases a server may return an error on the ping response but
still provide version details. The client should use these values when
available.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 27ef09a46ffeb8ba42548de937b68351009f30ea
Component: engine
2017-06-29 12:42:14 -04:00
1296f00c8a Merge pull request #33860 from lixiaobing1/masterFclose
add f.Close()  after dockerignore.ReadAll(f) before return err
Upstream-commit: e066edcfcfec3b6c4ad61a6a769174453968d62d
Component: engine
2017-06-29 10:19:45 -04:00
8ae901a8e8 Merge pull request #33647 from johnstep/improve-load-error
Stop trying to load images on an incompatible OS
Upstream-commit: 5fbc82128b42871734f35b468d410ba182ada917
Component: engine
2017-06-29 16:12:32 +02:00
8e64767c1e Merge pull request #33831 from cpuguy83/ignore_enotsup_on_relabel
Do not error on relabel when relabel not supported
Upstream-commit: 1ca83a6595f1c44b8643714082d2ec0e597d788c
Component: engine
2017-06-29 10:08:47 -04:00
89b4b291d7 Merge pull request #33867 from nishanttotla/fix-duplicate-platform-info
Do not add duplicate platform information to service spec
Upstream-commit: fcaa79b842b2e1e64784db8568334bb656a9b99e
Component: engine
2017-06-29 09:36:01 -04:00
0b353a6204 Change order of arguments in assertion to be more logical
Because of argument order to assert, in case of fail, we'll get message
like:

... obtained string = "uid=100(test) gid=101(test)\n"
... expected string = "uid=100(test) gid=101(test) groups=101(test)\n"

But obtained string should be second one, not the first one. And
expected string should be first. Here's sample output from test above:

... Output: before restart 'uid=100(test) gid=101(test)
', after restart 'uid=100(test) gid=101(test) groups=101(test)

It's confusing, because expected order of strings in assertion is
reversed. What goes before restart - should be "expected string" and
what goes after - should be "obtained string".

Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
Upstream-commit: 07cc701947533089fac5fea42e7d5a9a6ea1cfcc
Component: engine
2017-06-29 12:38:13 +03:00
53df97e881 update url for issue
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 6fcae83036970dd2aad73127da6cbd0d2becb333
Component: engine
2017-06-29 17:10:02 +08:00
d76f67a9f8 add f.Close() after dockerignore.ReadAll(f) before return err
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3072fce0671c5529a42b9e40a5344cce99318312
Component: engine
2017-06-29 00:51:31 -07:00
cc179a2f74 Merge pull request #33851 from tonistiigi/fix-add-remote
build: fix add from remote url
Upstream-commit: b7ac1571a35ce0df42cf96b0ed91f20c33678d31
Component: engine
2017-06-28 23:53:21 -07:00
30ba67aee0 Do not add duplicate platform information to service spec
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: da85b62001ec390bdc30b321c4a5cd23c17eeb81
Component: engine
2017-06-28 16:01:05 -07:00
400dd10c7d Merge pull request #33809 from Microsoft/jjh/svmdedicatedscratch
LCOW: Dedicated scratch space for service VM utilities
Upstream-commit: 8b29ba59ccdd4de45fa25137ec5d5a3845f5f5cc
Component: engine
2017-06-28 11:06:46 -07:00
6a011203cd Merge pull request #33857 from yongtang/33856-make-test-unit
Fix build error for `make test-unit`
Upstream-commit: 3d6ab220db348d82310487e3156d445f19dc0661
Component: engine
2017-06-28 00:31:42 -07:00
08b4e324e5 Merge pull request #33826 from Microsoft/jjh/lcownits
LCOW: Fix nits from 33241
Upstream-commit: 950d472c9ce4180b80e28030f7de68ffc3254f97
Component: engine
2017-06-27 22:56:38 -07:00
7a07cf4db4 Fix build error for make test-unit
This fix tries to address the issue raised by #33856 where
`make test-unit` will result in the failure:
```
...
...
dockerversion/useragent.go:20: undefined: Version
dockerversion/useragent.go:22: undefined: GitCommit
ok  	github.com/docker/docker/api	0.026s	coverage: 68.0% of statements
ok  	github.com/docker/docker/api/errors	0.003s	coverage: 100.0% of statements
FAIL	github.com/docker/docker/api/server [build failed]
make: *** [test-unit] Error 2
```

The issue is because in case of `make test-unit`, `source "${MAKEDIR}/.go-autogen"`
is missing.

This caused the `make test-unit` failure.

This fix adds `source "${MAKEDIR}/.go-autogen"` in `hack/make/test-unit`

This fix fixes #33856.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fac486d0a02d6af2759f6d0e81bd8a23d82d432c
Component: engine
2017-06-28 03:18:55 +00:00
674cb1c136 Merge pull request #32977 from imkin/30491-default-container-size
Add overlay2.size daemon storage-opt
Upstream-commit: acf855bf10e16b4282cb14f6cc34e378831a22c8
Component: engine
2017-06-27 20:00:02 -07:00
8266f5c84f Merge pull request #33838 from lixiaobing1/masterRange
optimize for loop with rootfs.DiffIDs
Upstream-commit: 74a5b14c80022392c17100e1cde6727842eceb6f
Component: engine
2017-06-27 14:34:10 -07:00
9a5747b3f9 LCOW: Fix nits from 33241
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4ec9766a27ffb964cec6b8b2745725965b2644aa
Component: engine
2017-06-27 11:59:49 -07:00
92d764e7fb LCOW: Dedicated scratch space for global service VM
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d1d649c891c8b06567afba7542ea9bf518cdaa02
Component: engine
2017-06-27 10:55:16 -07:00
4c52cfc0fb build: fix add from remote url
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2981667e11e24e9e1e61252a40ceb11fd7cb9811
Component: engine
2017-06-27 10:38:01 -07:00
59255c95cd Merge pull request #33832 from glasser/glasser/msg-source
Fix stderr logging for journald and syslog
Upstream-commit: 7843bfde36d9ded6fada32f469fe1790316137ae
Component: engine
2017-06-27 13:30:41 -04:00
50b9ac741e Merge pull request #33690 from raja-sami-10p/pkg/authorization
Increase test Coverage of pkg/authorization
Upstream-commit: 48e625ccca176787d56a6e87a0e2cc779ce5b6d3
Component: engine
2017-06-27 10:09:13 -07:00