Commit Graph

408 Commits

Author SHA1 Message Date
154c412ece Merge pull request #15798 from calavera/volume_driver_host_config
Move VolumeDriver to HostConfig to make containers portable.
Upstream-commit: 9ca4aa479788867cd2dce161efa1e43ea5dfc14f
Component: engine
2015-09-08 22:05:40 -04:00
6d655f6a79 Merge pull request #16130 from aboch/vnd
Vendoring libnetwork 3e31cead05cba8ec20241630d051e6d73765b3a2
Upstream-commit: eb5c81e79980dd7fad211724adb27e42a3295a6c
Component: engine
2015-09-08 11:29:34 -07:00
51f6d2a64b Vendoring libnetwork 3e31cead05cba8ec20241630d051e6d73765b3a2
+ Fix a couple of bugs introduced by previous vendoring:
  - in bitseq which prevents to use experimental overlay networking
  - in docker service ls cli o/p
+ Add missing http subrouter for newly introduced sandboxes
+ Fix fragmentation issue on vxlan header addition for overlay network driver
+ Remove libnetwork test code utilities from vendoring

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 4d648f924af93b6429d566120a65cb441fee692a
Component: engine
2015-09-08 07:36:35 -07:00
4a380ba714 Don't lookup container 4 times for stats
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: dc8a39036b8c9da4c21c48f492cdbb795170bb21
Component: engine
2015-09-08 10:12:46 -04:00
d4738db561 Fix connection block when using docker stats API
For now CLI `docker stats` will not block even if the container was
not running is because there is a 2s timeout setting when waiting for
the response.

I think why we hang there waiting for the container to run is because we
want to get the stats of container immediately when it starts running.
But it will block when use the API directly, for example
- curl
- Google Chrome plugin, Postman
- Firefox plugin, RESTClient

This patch keeps the feature that getting info immediately when container
starts running and in the meantime, it will not block when using the API
directrly.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: d9bf8163ad8579cf2ab9f55925f9ea5037e5b525
Component: engine
2015-09-06 17:21:41 +08:00
350911ed1c Move VolumeDriver to HostConfig to make containers portable.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 6549d6517bf9a7c79d21a86cbf36af10fcdbfbe0
Component: engine
2015-09-04 12:42:44 -04:00
d8058c38dd Remove /containers/ps from the api router.
This route was deprecated more than two years ago in the linked
commit[1]. It's not referenced anywhere in the documentation and it's
time to stop maintaning it.

[1]: 4f9443927e

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: b5cc077864665290456c5ec724427c1f0d7bc96b
Component: engine
2015-09-01 05:17:35 -04:00
f6d5f51a76 [daemon] Refactor image_delete.go
This file was not well documented and had very high cyclomatic complexity.
This patch completely rearranges this file and the ImageDelete method to
be easier to follow and more maintainable in the future.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 111d2f348767692a34366ff5cd01f607cf54ad57
Component: engine
2015-08-28 11:01:24 -07:00
1870e3919c golint fixes for daemon/ package
- some method names were changed to have a 'Locking' suffix, as the
 downcased versions already existed, and the existing functions simply
 had locks around the already downcased version.
 - deleting unused functions
 - package comment
 - magic numbers replaced by golang constants
 - comments all over

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: abd72d4008dde7ee8249170d49eb4bc963c51e24
Component: engine
2015-08-27 22:07:42 -07:00
bfe1bbc7d2 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b3b7eb2723461b1eb4be692f4bced0ae8ea9cb58
Component: engine
2015-08-26 13:37:52 -04:00
6dd2b74345 Merge pull request #15711 from monitorjbl/import-commit-message
adding message option to the import subcommand
Upstream-commit: b857dadb334fe0660abce4ae73a8b5b5c7f92c33
Component: engine
2015-08-26 11:42:10 +02:00
434547ed08 Merge pull request #14978 from gesellix/websocket-disable-check-origin
skip checkOrigin during websocket handshake
Upstream-commit: e134ccada7fae12271c4169e592b8bf09aff923d
Component: engine
2015-08-25 12:56:30 -04:00
b498641d47 Merge pull request #14665 from coolljt0725/fix_build_with_resource_limit
Fix build with resource limit which system not support.
Upstream-commit: 6f8c4480e4f99b08c84d25f1611d6b12ee646066
Component: engine
2015-08-25 16:42:13 +02:00
15378abfc2 adding message option to the import subcommand
Signed-off-by: Taylor Jones <monitorjbl@gmail.com>
Upstream-commit: 936b2c6afe490b562df4ebea854b116c3b40a9f5
Component: engine
2015-08-25 02:55:04 +00:00
e7fb39d7af Allow HEAD requests to container archives via CORS.
Add HEAD to Access-Control-Allow-Methods.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 354a2e105d26a310501891e6c097eacfd037d8c6
Component: engine
2015-08-24 05:57:22 -04:00
589fca3f48 fix a panic when the exec fails to start
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: fcf9daad91d9be24ceddbc4add4d3a8179c9b32c
Component: engine
2015-08-22 00:01:44 +08:00
6442b64e6e Fix build with resource limit which system is not support.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 770daa15f359ddc7329a2a031332c251e5a53a29
Component: engine
2015-08-18 11:54:00 +08:00
57a36297f7 Fix issue with exec TTY caused by 15446
The bool logic around setting up the TTY ended up getting flipped
accidentally.
Also added a test for exec with TTY.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5ffcecf130aea8c0b92d1be728e2c302cf2c6c70
Component: engine
2015-08-14 14:55:26 -07:00
60f12fa9b0 Merge pull request #15446 from cpuguy83/better_err_on_exec_err
Return better errors from exec
Upstream-commit: d3198fa8c4f704a2ddd4d876003757b30a61c00c
Component: engine
2015-08-12 11:13:29 -07:00
b585740325 Fix incorrect comment
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: d626f77e36e16911358248af678cc00900a6f5b5
Component: engine
2015-08-11 19:45:23 -04:00
c6ac4667d6 skip checkOrigin during websocket handshake
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: 9bde19e72a59a2af2dcbc72abf2521fa02718bcc
Component: engine
2015-08-12 00:05:59 +02:00
223b2cba85 Mark network ui endpoints unix-only
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6e3740450d3265546e6992ec4890cfdaa78296e3
Component: engine
2015-08-10 21:49:27 -07:00
978d8e86f8 Return better errors from exec
Also cleans up some of the API side of exec.
Was writing the header twice (two different headers).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f078f75bf25353720f28f9f1ea180374fe205302
Component: engine
2015-08-10 09:53:19 -04:00
2c6e673ce7 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Upstream-commit: 514623272398574c8fd7ef3fe42c5b2ae161349a
Component: engine
2015-08-07 23:25:49 +01:00
502a6d4faf fix golint warnings/errors on package api/types/
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 3d6617ffe7d9242107ac09eab4f2d8ce87acb95c
Component: engine
2015-08-07 09:43:43 +08:00
efe044b445 Windows - make docker cp functional
Signed-off-by: John Howard <jhoward@microsoft.com>

Conflicts:
	pkg/archive/copy.go

Make it compile

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2a237615c0915b60b8dc6c13a377bb766780ecbf
Component: engine
2015-08-06 11:22:38 -07:00
23d0cda657 Remove pkg/systemd
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 931645c46056ae24b2df51c447b6df1a66b2ca30
Component: engine
2015-08-06 14:35:00 +02:00
3ec8bc1fa3 Cleanup: Merge adjustCPUShares to adoptContainerSettings
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e0af23dc18eac17633ab1f2541f26b56c303a18c
Component: engine
2015-08-06 08:15:14 +08:00
0cd1b722f7 Split API handlers into domain specific files
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1a77580030439cef25e8f987b03733f173662746
Component: engine
2015-08-03 11:12:44 -04:00
03122f024f Merge pull request #15144 from aaronlehmann/graph-cleanup
Documentation improvements and code cleanups for graph package
Upstream-commit: 8f2dca538619372663a94bc5141dbc7f121defb8
Component: engine
2015-07-31 15:11:34 -07:00
c5a5900eb9 Documentation improvements and code cleanups for graph package
Expand the godoc documentation for the graph package.

Centralize DefaultTag in the graphs/tag package instead of defining it
twice.

Remove some unnecessary "config" structs that are only used to pass
a few parameters to a function.

Simplify the GetParentsSize function - there's no reason for it to take
an accumulator argument.

Unexport some functions that aren't needed outside the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d4836cd7ec1c085c5a5caa7eb7f5eda4ace10eb6
Component: engine
2015-07-30 14:27:10 -07:00
9abcd15501 Windows: Daemon build is broken
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b43dc0d93c3678c3fe5e6247aa19a2bf71ef35d6
Component: engine
2015-07-29 20:08:51 -07:00
1bd0671e56 Merge pull request #15098 from calavera/backwards_compat_kill_error
Keep backwards compatibility in kill api.
Upstream-commit: 4a71323ec3c00be48e3539a1da0444972f22c355
Component: engine
2015-07-29 16:42:36 -07:00
59df5a01ec make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 26c03d561ab126287bb3034cc23477d18869a888
Component: engine
2015-07-29 21:25:56 +03:00
dcda9483a8 api/server fix golint errors/warnings.
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 351f6b8ec011983d894951769c2116c9feaf81d2
Component: engine
2015-07-28 22:44:39 +00:00
26753acfcd Keep backwards compatibility in kill api.
Return an error when the container is stopped only in api versions
equal or greater than 1.20 (docker 1.8).

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 621e3d8587bbee86b4e36d0b7822662bfbedd76c
Component: engine
2015-07-28 12:25:36 -07:00
5acbf86531 Windows: Factoring out unused fields
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 47c56e4353792e16f994a35ea4063768bee6590e
Component: engine
2015-07-27 17:44:18 -07:00
3d5c90498b Merge pull request #14759 from vdemeester/pkg-golint
golint on some pkg/* packages
Upstream-commit: 25c42cc0d0a83325817e5fdb8fa654c9e5ab54d5
Component: engine
2015-07-27 15:19:46 -07:00
2db54e3ac2 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 18c7c67308bd4a24a41028e63c2603bb74eac85e
Component: engine
2015-07-27 21:26:21 +02:00
b61648e148 Lint fixes on runconfig
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5170a2c096ff64d4bfbe0fab296ec6777c412bc3
Component: engine
2015-07-27 21:23:15 +02:00
dec1a0e3c4 Check for nil before using HostConfig to adjustCpuShares
Fix #14915. Add unit test for #14915.
Thanks @runcom for the test case: when the client calls 1.18 api
version w/o hostconfig it results in a nil pointer dereference.

Signed-off-by: Stephen Rust <srust@blockbridge.com>
Upstream-commit: c358a4cd3597ac330674c9d93b6038e8f455c8f7
Component: engine
2015-07-26 20:33:04 -04:00
Lei
b278b668e9 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 877dbbbde8aaf6583a81d9946e4c83db8e356b1a
Component: engine
2015-07-23 10:26:06 +08:00
89bfead992 Merge pull request #14869 from calavera/remove_duplicated_cp_handlers_init
Remove duplicated code parsing parameters for the archiving handlers.
Upstream-commit: 3ee7297b7e30b1af0849947132e4f9234ec49a82
Component: engine
2015-07-22 13:25:34 -07:00
2cc4c8f45c Remove duplicated code parsing parameters for the archiving handlers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1612ff972679cb2ab0f89a831156b23473035f10
Component: engine
2015-07-22 12:39:46 -07:00
ec7391b794 Merge pull request #14442 from cpuguy83/refactor_logdrvier_reader
Refactor log driver reader
Upstream-commit: 1c6fe58efc413b606b6b24e42584ca14be2d1ca8
Component: engine
2015-07-22 11:54:35 -07:00
9ac57ffd87 Merge pull request #14790 from hqhq/hq_golint_build
Fix golint warnings for builder
Upstream-commit: a751c0a52fa5c845631db8de285f4c0a809580bb
Component: engine
2015-07-22 08:17:04 -07:00
4df93cb58f Fix wrong Content-Type returned by /images/search API
/images/search was replying with Content-Type text/plain instead
of application/json.
Fix #14846

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 1a5d6a94c9e4c099354d9125ea857f6277eca0b7
Component: engine
2015-07-22 11:07:41 +02:00
2d8d0361a7 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
Upstream-commit: 50d2597e490c4636ee8cacabf34bb9ed3e21d3fc
Component: engine
2015-07-22 09:02:00 +02:00
43c8d7a97f Fix golint warnings for builder
Addresses: #14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8c4a282a5719455cb5c63b917deb2a2042eed685
Component: engine
2015-07-22 13:29:03 +08:00
5104b34c44 Split reader interface from logger interface
Implement new reader interface on jsonfile.
Moves jsonlog decoding from daemon to jsonfile logger.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c0391bf5545afef5e675138556c39e4c0e9bf91b
Component: engine
2015-07-21 20:47:31 -04:00