Commit Graph

1812 Commits

Author SHA1 Message Date
4456b512b3 Merge pull request #20292 from Microsoft/jjh/testunit-pkgarchivestep2
Windows CI: test-unit on pkg\archive part 2
Upstream-commit: aae454cb520cb36e5b4b36f7d71a6297c6ffc3c2
Component: engine
2016-02-18 12:12:09 -05:00
9c01cfa3e9 Merge pull request #20408 from cpuguy83/use_pool_for_pubsub_wg
Use pool for pubsub `Publish`'s waitgroups
Upstream-commit: 9a81f206b3f951e9e19e642b070fcab393fa3318
Component: engine
2016-02-17 14:46:13 -08:00
c68f4a42c4 Merge pull request #20260 from Microsoft/jjh/testunit-pkggitutils
Windows CI: Unit tests - port pkg\gitutils
Upstream-commit: 647d3266eab1bf184f6c880c972a75c1b80a32cc
Component: engine
2016-02-17 13:50:17 -08:00
7aa41cb67d Use pool for pubsub Publish's waitgroups
benchmark             old ns/op      new ns/op      delta
BenchmarkPubSub-8     1036494796     1032443513     -0.39%

benchmark             old allocs     new allocs     delta
BenchmarkPubSub-8     2467           1441           -41.59%

benchmark             old bytes     new bytes     delta
BenchmarkPubSub-8     212216        187792        -11.51%

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 58d98f82888345a49f2e7660a0a5b35a5da891f5
Component: engine
2016-02-17 14:36:57 -05:00
54e25a7e3f pkg: remove unused filenotify
pkg/filenotify isn't used anymore and it causes problems with
hack/vendor.sh (nothing uses it, so hack/vendor.sh will remove the
vendored code).

Signed-off-by: Aleksa Sarai <asarai@suse.com>
Upstream-commit: ee99b5f2e96aafa982487aadbb78478898ae0c71
Component: engine
2016-02-18 00:11:43 +11:00
83d138a180 Merge pull request #20366 from LK4D4/socks_proxy
Add support for forwarding Docker client through SOCKS proxy
Upstream-commit: 5c78515430860ad822e016cc5cd5d5ff3dd6a21c
Component: engine
2016-02-16 22:29:49 -08:00
f663556077 Merge pull request #19498 from mountkin/refactor-jsonfilelog-reader
use pubsub instead of filenotify to follow json logs
Upstream-commit: 8545fdc6ddd7010a4134062cf99444e586c3c99e
Component: engine
2016-02-16 13:55:48 -08:00
4f226110ac Add support for forwarding Docker client through SOCKS proxy
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 05002c2501ac549b3cf677ab04d0f571cc456360
Component: engine
2016-02-16 11:09:28 -08:00
97fcfe9c7e optimize pubsub.Publish function
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 1e0f1ec52543bc83099fb91cd34dca4d38100e6f
Component: engine
2016-02-15 19:25:21 +08:00
6ebcbbfdd8 use pubsub instead of filenotify to follow json logs
inotify event is trigged immediately there's data written to disk.
But at the time that the inotify event is received, the json line might
not fully saved to disk. If the json decoder tries to decode in such
case, an io.UnexpectedEOF will be trigged.
We used to retry for several times to mitigate the io.UnexpectedEOF error.
But there are still flaky tests caused by the partial log entries.

The daemon knows exactly when there are new log entries emitted. We can
use the pubsub package to notify all the log readers instead of inotify.

Signed-off-by: Shijiang Wei <mountkin@gmail.com>

try to fix broken test. will squash once tests pass

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: b1594c59f5e0d1ac898eacde8d91b1ba33c2b626
Component: engine
2016-02-15 19:25:16 +08:00
08e0c58b53 apparmor: fix version checks to work properly
Using {{if major}}{{if minor}} doesn't work as expected when the major
version changes. In addition, this didn't support patch levels (which is
necessary in some cases when distributions ship apparmor weirdly).

Signed-off-by: Aleksa Sarai <asarai@suse.com>
Upstream-commit: 4bf7a84c969b9309b0534a61af55b8bb824acc0a
Component: engine
2016-02-15 20:36:07 +11:00
f5a55660d5 Windows CI: test-unit on pkg\archive part 2
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d6b7819185b003a1e61f9b80cc6123e30143f9c8
Component: engine
2016-02-12 15:40:41 -08:00
9115c5f1b0 Windows CI: test-unit pkg\archive step 1
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1a714e76a2cb9008cd19609059e9988ff1660b78
Component: engine
2016-02-12 10:13:44 -08:00
586ffb04ce Merge pull request #20258 from Microsoft/jjh/testunit-authz
Windows CI: test-unit turn off pkg\authorisation
Upstream-commit: 27ab98e846b7737598686a6f80f01e29677bdb81
Component: engine
2016-02-12 08:33:20 +01:00
eda871fb37 Merge pull request #20259 from Microsoft/jjh/testunit-pkgfilenotify
Windows CI: test-unit for pkg\filenotify
Upstream-commit: 991cb36d76b96b6f705e82e59953048704152498
Component: engine
2016-02-12 08:32:43 +01:00
5d4d6cb4a4 Merge pull request #20249 from Microsoft/jjh/testunit-pkgintegration
Windows CI: Fix test-unit for pkg\integration
Upstream-commit: 659bf082811e6803a8be450cbfbe3b4801afe305
Component: engine
2016-02-12 08:32:03 +01:00
44d4475feb Windows CI: Unit tests - port pkg\gitutils
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: eaf41b74107d4cd5b2d498abd622a492aa6b2d62
Component: engine
2016-02-11 18:19:17 -08:00
81b3251921 Windows CI: test-unit for pkg\filenotify
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 28ee6fe7ca57e8e85ca7e0b6d2cb05c563d95e82
Component: engine
2016-02-11 17:47:26 -08:00
928ef805a9 Windows CI: test-unit turn off pkg\authorisation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 57faef5c71b90874f66f1e6b5d2e23591b205e28
Component: engine
2016-02-11 17:42:12 -08:00
697a990701 fix common misspell
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 99a396902f0ea9d81ef87a683489b2435408f415
Component: engine
2016-02-11 15:49:36 -08:00
1066ac0f5a Windows CI: Fix test-unit for pkg\integration
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 41d3bb43f463a92b3611b0939e9ce51d523c62bb
Component: engine
2016-02-11 15:06:22 -08:00
dd28cfc3c0 Merge pull request #20216 from Microsoft/jjh/testunit-pkgplugins-v2
Windows CI: test-unit on pkg\plugins
Upstream-commit: 5627e400fe666da8159dd7555853e4ca8fbd5933
Component: engine
2016-02-11 12:39:08 +01:00
31b16ed933 Windows CI: test-unit on pkg\plugins
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4b3001e85aff2c51a69eec205023e32384bebbdf
Component: engine
2016-02-10 19:28:30 -08:00
34dcc50973 Windows CI: Unit Test - pkg/mount is Unix specific
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d509e615404d8e6f568cf30b6ad37311d4698ece
Component: engine
2016-02-10 18:09:15 -08:00
39a54ff7ac Cleanup WriteFlusher
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 96f1a1a10b63ac446f0d9da8521cd871212a1063
Component: engine
2016-02-09 14:02:26 -05:00
0b639e2753 Fixing 'docker save' on Windows.
Save was failing file integrity checksums due to bugs in both
Windows and Docker. This commit includes fixes to file time handling
in tarexport and system.chtimes that are necessary along with
the Windows platform fixes to correctly support save. With this
change, sysfile_backups for windowsfilter driver are no longer
needed, so that code is removed.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 041a9510c671ecf4724bf15388fdb9de549b04ed
Component: engine
2016-02-08 18:08:49 -08:00
48e4739308 Fix 'tcp+tls' protocol not being accepted
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 878a0dc85cacfcf0005d3d2487f6d3266c31552d
Component: engine
2016-02-08 17:34:39 +00:00
d5f0b4ca87 Merge pull request #20002 from twistlock/19575_authz_plugin_support_events
Fix 19575: Docker events doesn't work with authorization plugin
Upstream-commit: 862f073694e3b60b89e099cdf12cfb8ec1a6a9e8
Component: engine
2016-02-08 09:10:39 -08:00
3e59ad891c Fix 19575: Docker events doesn't work with authorization plugin
To support the requirement of blocking the request after the daemon
responded the authorization plugin use a `response recorder` that replay
the response after the flow ends.

This commit adds support for commands that hijack the connection and
flushes data via the http.Flusher interface. This resolves the error
with the event endpoint.

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 5ffc810df22c3779b4df8ce28d94e4bf89d34e2f
Component: engine
2016-02-05 22:30:01 +02:00
32fac24f32 Apply context changes to the client.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: fe53be4e1785ab4d8cadf246e5f2de419f337adc
Component: engine
2016-02-04 13:59:57 -05:00
aba5001cd8 Improvements to ANSI emulation in conemu
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 506722bf9ffd017db59f3ae14addb59c9bf227ab
Component: engine
2016-01-28 20:37:42 -08:00
af019e7c8c Adding biologist Christiane Nüsslein Volhard and AI pioneer Marvin Minsky
Signed-off-by: Anuj Bahuguna anujbahuguna.dev@gmail.com

Signed-off-by: Anuj Bahuguna <anujbahuguna.dev@gmail.com>
Upstream-commit: 2d459a160020f2a8a3482d8c5649996120123633
Component: engine
2016-01-28 14:33:58 +00:00
4edafc3bc1 *: purge dockerinit from source code
dockerinit has been around for a very long time. It was originally used
as a way for us to do configuration for LXC containers once the
container had started. LXC is no longer supported, and /.dockerinit has
been dead code for quite a while. This removes all code and references
in code to dockerinit.

Signed-off-by: Aleksa Sarai <asarai@suse.com>
Upstream-commit: 4357ed4a7363a1032edf93cf03232953c805184f
Component: engine
2016-01-26 23:47:02 +11:00
f0e82098a7 Add back compat for volume drivers Get and Ls
Use a back-compat struct to handle listing volumes for volumes we know
about (because, presumably, they are being used by a container) for
volume drivers which don't yet support `List`.

Adds a fall-back for the volume driver `Get` call, which will use
`Create` when the driver returns a `404` for `Get`. The old behavior was
to always use `Create` to get a volume reference.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f6c20d9b22ec9913f67b6c2ebdb5ef07c87b8cd7
Component: engine
2016-01-22 22:48:17 -05:00
44fa01bbec Merge pull request #19517 from calavera/validate_config_keys
Verify that the configuration keys in the file are valid.
Upstream-commit: 34a83f9f2c0516b3c5e7024393487eee54309401
Component: engine
2016-01-22 15:01:29 -05:00
50fb232049 Merge pull request #19549 from cpuguy83/bump_plugin_api_version
Bump plugin API version
Upstream-commit: ae8f7c69e3fdbf39b8e0780813d550588e27414e
Component: engine
2016-01-22 09:33:29 -08:00
7dc1824c45 Merge pull request #19470 from Microsoft/jjh/confans
Windows: VirtualTerminalInput native console
Upstream-commit: 73ae424ed8a8cdd9cfe2d70c3334bcbe27cb9e91
Component: engine
2016-01-22 17:27:47 +01:00
1344a300e6 Merge pull request #19558 from LK4D4/reduce_cgroup_parsing
Refactor sysinfo usage
Upstream-commit: c91045a78bf138aa32acd215fed4084d3b912bec
Component: engine
2016-01-22 11:18:53 +01:00
7141a04b13 Merge pull request #19263 from jfrazelle/update-aa-parser
refactor aaparser pkg, add unit tests
Upstream-commit: 3233f4560912fee87857f653a8bb32050dc04927
Component: engine
2016-01-21 19:40:53 -05:00
a73130b07f Verify that the configuration keys in the file are valid.
- Return an error if any of the keys don't match valid flags.
- Fix an issue ignoring merged values as named values.
- Fix tlsverify configuration key.
- Fix bug in mflag to avoid panics when one of the flag set doesn't have any flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ed4038676f09d124180d634ec2cb341745f5fc79
Component: engine
2016-01-21 16:56:12 -05:00
7e789b4066 Bump plugin API version
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 54587d861d6664d6d32bc62a46c0c7ea0c7853e6
Component: engine
2016-01-21 11:41:32 -05:00
e789dfd374 Remove hard coded 'docker' string from package
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: d44e79a3661be67c49899c3a3e5c3773b8c21073
Component: engine
2016-01-22 00:14:52 +08:00
2f86eee3b4 Reuse subsystems mountpoints between checks
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 781a33b6e77a122f2a171a941da3a1798fc73c27
Component: engine
2016-01-20 19:20:59 -08:00
cb9279d8f4 Windows: VirtualTerminalInput native console
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 33729d3b5a5f0c49bf14a387f87b918d1adedc48
Component: engine
2016-01-19 15:59:21 -08:00
ef690537a4 Windows: Remove dead code
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 76ebd3dd179444b4a464db6e970030dd695cf5a1
Component: engine
2016-01-15 12:48:40 -08:00
25aab1428e Merge pull request #18587 from calavera/daemon_configuration_file
Allow to set daemon and server configurations in a file.
Upstream-commit: e44364eae90784b423eee8b2969bda9cd2429746
Component: engine
2016-01-14 16:44:58 -08:00
035da2c40e Merge pull request #19325 from mingqing/fix-pid-convert-error
fix pidfile, pid is num use '/proc + string(pid)' can't found it
Upstream-commit: 3b6a989d815cc1acc23a0d7b775abda337b464d6
Component: engine
2016-01-14 16:49:20 -05:00
1a8f320266 Allow to set daemon and server configurations in a file.
Read configuration after flags making this the priority:

1- Apply configuration from file.
2- Apply configuration from flags.

Reload configuration when a signal is received, USR2 in Linux:

- Reload router if the debug configuration changes.
- Reload daemon labels.
- Reload cluster discovery.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 677a6b3506107468ed8c00331991afd9176fa0b9
Component: engine
2016-01-14 16:44:37 -05:00
caec173c21 Add an unsafe memory discovery store for testing.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 22a81a2c588a7505fd5f900e2093c44cd51ae142
Component: engine
2016-01-14 11:58:38 -05:00
cc17e2f69a fix pidfile, pid is num use '/proc + string(pid)' can't found it
Signed-off-by: mingqing <limingqing@cyou-inc.com>
Upstream-commit: 6a033fa03e341f8578721045a91dcbf8015982f6
Component: engine
2016-01-14 16:03:33 +08:00