Commit Graph

5240 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
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
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
ec1ee882b3 Merge pull request #33322 from jsoref/spelling
Spelling
Upstream-commit: ff4f700f74450018f36d014f3cde0ff1b9c17fb3
Component: engine
2017-07-04 15:46:34 +02: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
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
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
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
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
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
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
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
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
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
359031100e Add overlay2.size daemon storage-opt
This commit adds the overlay2.size option to the daemon daemon
storage opts.

The user can override this option by the "docker run --storage-opt"
options.

Signed-off-by: Dhawal Yogesh Bhanushali <dbhanushali@vmware.com>
Upstream-commit: a63d5bc03513755015827d0fe93563240429f1e0
Component: engine
2017-06-27 01:07:48 -07:00
e2c85453e0 Merge pull request #33815 from jstarks/lcow_command_args
LCOW: pass command arguments without extra quoting
Upstream-commit: bcc8b2bc474ef2536bd4bac93a7b94935efaf57a
Component: engine
2017-06-26 21:46:29 -07:00
442b559ba0 Merge pull request #31497 from dnephin/engine-local-image-data
Add a LastTagTime for images
Upstream-commit: 8f3c526e7851e047f5dde31bd2ce69f960e1d115
Component: engine
2017-06-26 18:51:09 -07:00
525974b970 Merge pull request #33781 from mlaventure/fix-healhcheck-goroutine-leak
Prevent a goroutine leak when healthcheck gets stopped
Upstream-commit: da28210a157a3bf5662f1a049bb10f9b69d2a5a2
Component: engine
2017-06-26 15:34:43 -07:00
29123f2ea7 Fix stderr logging for journald and syslog
logger.PutMessage, added in #28762 (v17.04.0-ce), clears msg.Source. So journald
and syslog were treating stderr messages as if they were stdout.

Signed-off-by: David Glasser <glasser@davidglasser.net>
Upstream-commit: 917050c5728f2fb9958ccb3ab66a23766f741adc
Component: engine
2017-06-26 14:37:43 -07:00
f5f8240661 Set a LastUpdated time in image metadata when an image tag is updated.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 016eea004ba0109d7cd965eab242ed17e4f0f36c
Component: engine
2017-06-26 12:16:26 -07:00
a08baae726 LCOW: pass command arguments without extra quoting
Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 19645521a92869be7210fb663ed5e0e82e329ca5
Component: engine
2017-06-24 10:23:17 -07:00
8065c10b0c Merge pull request #33698 from cpuguy83/dm_deferred_delete_default
Enable dm deferred_* with version check
Upstream-commit: 5b54e78947a5ab8b4c9e60179b205a82227944e4
Component: engine
2017-06-23 19:30:05 -07:00
5b78ab86a3 Merge pull request #31273 from fabiokung/consistent-ro-view
No container locks on `docker ps`
Upstream-commit: 56ad9bb1b4f7463cf1d6eab8b6f924f46ff2c2fe
Component: engine
2017-06-23 15:28:55 -07:00
2c8425881b Prevent a goroutine leak when healthcheck gets stopped
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 67297ba0051d39be544009ba76abea14bc0be8a4
Component: engine
2017-06-23 08:06:49 -07:00
55b5e8b06f Net operations already hold locks to containers
Fix a deadlock caused by re-entrant locks on container objects.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 37addf0a50ccba51630368c6ed09eb08166d6f48
Component: engine
2017-06-23 07:52:35 -07:00
cd24ef2d4a avoid saving container state to disk before daemon.Register
Migrate legacy volumes (Daemon.verifyVolumesInfo) before containers are
registered on the Daemon, so state on disk is not overwritten and legacy
fields lost during registration.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 76d96418b13080514f3fb861072b06cb91d71cff
Component: engine
2017-06-23 07:52:34 -07:00
60fed1f9a7 delete unused code (daemon.Start)
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 66b231d598174986ad08236f0a38beb825e5a3c3
Component: engine
2017-06-23 07:52:34 -07:00
69f8ddc123 ensure heath monitor status updates are propagated
initHealthMonitor and updateHealthMonitor can cause container state to
be changed (State.Health).

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 04bd768a889f94a4dc6ad25e2a014dffd0a4e04e
Component: engine
2017-06-23 07:52:34 -07:00
9755d1918d avoid re-reading json files when copying containers
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: a43be3431e51b914ab170569b9e58239d64b199c
Component: engine
2017-06-23 07:52:34 -07:00
b8affe908f only Daemon.load needs to call label.ReserveLabel
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 9134e87afc6f3215a58d23c7261242b764357501
Component: engine
2017-06-23 07:52:33 -07:00
940ce3d71d save deep copies of Container in the replica store
Reuse existing structures and rely on json serialization to deep copy
Container objects.

Also consolidate all "save" operations on container.CheckpointTo, which
now both saves a serialized json to disk, and replicates state to the
ACID in-memory store.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: edad52707c536116363031002e6633e3fec16af5
Component: engine
2017-06-23 07:52:33 -07:00
debc6bf90d verifyVolumesInfo needs a container lock
It operates on containers that have already been registered on the
daemon, and are visible to other goroutines.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 201a37f7a110402a76ac1ee21b5d09ccffed2acb
Component: engine
2017-06-23 07:52:33 -07:00
a2b99b3d6c no need to save state to disk here
State will be saved on the following operation once the container is
properly registered on the daemon.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 03aa24721c88e508f208c1ff72d8cd1af7e6a0f8
Component: engine
2017-06-23 07:52:32 -07:00
ae145558ae Move checkpointing to the Container object
Also hide ViewDB behind an inteface.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: aacddda89df05b88a6d15fb33c42864760385ab2
Component: engine
2017-06-23 07:52:32 -07:00
8111997a67 stop grabbing container locks during ps
Container queries are now served from the consistent in-memory db, and
don't need to grab a lock on every container being listed.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 8e425ebc422876ddf2ffb3beaa5a0443a6097e46
Component: engine
2017-06-23 07:52:31 -07:00
8889d56b70 keep a consistent view of containers rendered
Replicate relevant mutations to the in-memory ACID store. Readers will
then be able to query container state without locking.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: eed4c7b73f0cf98cf48943da1c082f3210b28c82
Component: engine
2017-06-23 07:52:31 -07:00
8cedd0fee9 Move platform specific mount data to Container
The Solaris version (previously daemon/inspect_solaris.go) was
apparently missing some fields that should be available on that
platform.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: cfc404a375817125e4b32a9cd6a4ec7e3c55dc4e
Component: engine
2017-06-23 07:22:47 -07:00
c41db1dd55 fd leak and error handling
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: 0042f992d80b59b97380bbbbeb271fd3030edd90
Component: engine
2017-06-23 15:38:35 +08:00
f565ab7c75 Merge pull request #33773 from aaronlehmann/vendor-swarmkit-79381d0
Vendor swarmkit 79381d0
Upstream-commit: 4d0c01ac17933ee0c8b94bc2beea5965377d42ef
Component: engine
2017-06-22 16:26:34 -07:00
33086f32cd Grab a lock to read container.RemovalInProgress
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 481a92cb4111ebc1b7d4de5eeff84f570e4ba5dd
Component: engine
2017-06-21 19:11:23 -07:00