Commit Graph

31121 Commits

Author SHA1 Message Date
7aed75f09c Allow stopping of paused container
When a container is paused, signals are sent once the container has been
unpaused.
Instead of forcing the user to unpause a container before they can ever
send a signal, allow the user to send the signals, and in the case of a
stop signal, automatically unpause the container afterwards.

This is much safer than unpausing the container first then sending a
signal (what a user is currently forced to do), as the container may be
paused for very good reasons and should not be unpaused except for
stopping.
Note that not even SIGKILL is possible while a process is paused,
but it is killed the instant it is unpaused.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c3feb046b9b1eb606cc7e853d020799eb3800e0e
Component: engine
2017-07-12 10:35:48 -04:00
0887a18a3a Merge pull request #33575 from cpuguy83/plugins_on_swarm
Plugins on swarm
Upstream-commit: 05c7c311390911daebcf5d9519dee813fc02a887
Component: engine
2017-07-07 02:23:07 -07:00
0371882bb8 Merge pull request #33662 from madhanrm/sharedendpoint
Include Endpoint List for Shared Endpoints
Upstream-commit: 9aecbbf9bf50dd5c3d250e8dc1c74360a9f30d8e
Component: engine
2017-07-06 23:44:23 -07:00
cb27d2c59c Merge pull request #33940 from yaocaigen/fix_container_multi_names
Fix run `docker rename <container-id> new_name` concurrently, the container will have multi names
Upstream-commit: 8e3555f8539d91f530f895e19a51db14f1ca93fb
Component: engine
2017-07-07 10:58:01 +09:00
abfe031053 Merge pull request #33713 from x1022as/error_fd
fd leak and error handling
Upstream-commit: 3be2273d03e4b06dff4006b1a600c578c7aa09fc
Component: engine
2017-07-06 16:47:34 -07:00
9b7ee7b6ee Merge pull request #33935 from AkihiroSuda/pkg-archive-go1.9
pkg/archive.FileInfoHeader: fill file type bits
Upstream-commit: 0fcd082d886323b4506b28394ee28eaa5a5dfe7f
Component: engine
2017-07-06 14:22:45 -07:00
455cc50b83 Include Endpoint List for Shared Endpoints
Do not allow sharing of container network with hyperv containers

Signed-off-by: Madhan Raj Mookkandy <madhanm@microsoft.com>
Upstream-commit: 349913ce9fde34d8acd08fad5ce866401f4d135e
Component: engine
2017-07-06 12:19:17 -07:00
c782cb6c44 Make plugin emit strongly typed, consumable events
Enables other subsystems to watch actions for a plugin(s).

This will be used specifically for implementing plugins on swarm where a
swarm controller needs to watch the state of a plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 72c3bcf2a533a827402945e3a55872e2db4fb024
Component: engine
2017-07-06 14:26:06 -04:00
9691a9deb1 Merge pull request #33941 from thaJeztah/update-api-docs
Add missing API documentatoin for DataPathAddr
Upstream-commit: 9d95740dbfb790b3ea531a363697076ffb97a294
Component: engine
2017-07-05 18:35:45 -07:00
c36d6e2e41 Merge pull request #33859 from tonistiigi/session-includepaths
Add path filtering to build session client
Upstream-commit: 19ee87361685ae63aa2eca4a2ae5a2035484814b
Component: engine
2017-07-05 18:21:48 -07:00
74d8ac0d96 Merge pull request #33897 from cpuguy83/jsonfile_log_blocking
Fix log readers can block writes indefinitely
Upstream-commit: db8c2651b84c681579389bb57d309a3b210a7e78
Component: engine
2017-07-05 18:21:14 -07:00
096ae0539f Merge pull request #33898 from crosbymichael/swappiness
Do not set -1 for swappiness
Upstream-commit: 490b55e8fa73be4c78de0118fe63a7ce5dc0f383
Component: engine
2017-07-05 17:04:08 -07:00
2aedd8b160 Fix log readers can block writes indefinitely
Before this patch, a log reader is able to block all log writes
indefinitely (and other operations) by simply opening the log stream and
not consuming all the messages.

The reason for this is we protect the read stream from corruption by
ensuring there are no new writes while the log stream is consumed (and
caught up with the live entries).

We can get around this issue because log files are append only, so we
can limit reads to only the section of the file that was written to when
the log stream was first requested.

Now logs are only blocked until all files are opened, rather than
streamed to the client.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e2209185ed1c959131d4068ec7fc93e194dc0802
Component: engine
2017-07-05 14:04:52 -04:00
14554f495c Fix run docker rename <container-id> new_name concurrently, the container will have multi names
When run `docker rename <container-id> new_name` concurrently, every operation will release
container's old name. So container will have multi new names reserve in nameIndex.

Signed-off-by: Yang Pengfei <yangpengfei4@huawei.com>
Upstream-commit: cc2340689c431504689d01c9516b3a340b2e8dbc
Component: engine
2017-07-05 16:56:31 +08:00
64645433a6 pkg/archive.FileInfoHeader: fill file type bits
Go 1.9 (golang/go@66b5a2f) removed file type bits from
archive/tar.FileInfoHeader().

This commit ensures file type bits are filled even on Go 1.9 for
compatibility.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 1a451d9a7bb9cd7d437b42d4e73b0560fbf84348
Component: engine
2017-07-05 05:24:32 +00:00
08a00684a2 Merge pull request #33944 from cpuguy83/fix_wrong_dirname
Fix plugin remove dir name after rename.
Upstream-commit: 82c2a08b6018586f3c8f35405c3bd6fce3c78ccd
Component: engine
2017-07-04 16:12:39 +02:00
ec1ee882b3 Merge pull request #33322 from jsoref/spelling
Spelling
Upstream-commit: ff4f700f74450018f36d014f3cde0ff1b9c17fb3
Component: engine
2017-07-04 15:46:34 +02:00
b4c3d928eb Fix plugin remove dir name after rename.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4bf263c19873718394f8161dbc020bf4be30f9d6
Component: engine
2017-07-04 07:37:26 -04:00
e720e150d4 Add missing API documentatoin for DataPathAddr
COmmit 0307fe1a0bcdc02583a24add41eb783c117bad8c added
a new `DataPathAddr` property to the swarm/init and swarm/join
endpoints. This property was not yet added to the
documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c79c16910c0f3d6e88f2dc6ef609ecc3b02ccef9
Component: engine
2017-07-04 03:11:40 -07:00
f2ec8286bb Merge pull request #33494 from cpuguy83/document_stream_format_in_client_lib
Add stream format details for attach/logs endpoint
Upstream-commit: a9358df62cde2deb8184c742e6fb8d16c98a04a9
Component: engine
2017-07-03 22:02:24 -07:00
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
643654c2f0 Spelling fixes
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 39bcaee47b8a284a46b761afe218ba7deda0d482
Component: engine
2017-07-03 13:13:09 -07: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
654d76c922 Do not set -1 for swappiness
Do not set a default value for swappiness as the default value should be
`nil`

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 9d87e6e0fb799d6ef3bb9a97bc523f8d343b5fb3
Component: engine
2017-07-03 11:23:15 -07: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
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