Commit Graph

2187 Commits

Author SHA1 Message Date
167591374d Merge pull request #28683 from darrenstahlmsft/SystemDLL
Swap usage of LazyDLL and LoadDLL to LazySystemDLL
Upstream-commit: 5c1826ec4de381df9f739ce0de28e37d4f734d47
Component: engine
2016-11-22 16:58:30 -08:00
4d1ac89cc0 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 22c83c567f379dfd475ecd35665e1cc9e5b9c314
Component: engine
2016-11-22 14:57:11 -08:00
dc5227ef8f Merge pull request #28506 from bfirsh/prepare-api-docs-for-swagger-docs
Prepare docs and Swagger definition for automatically generated API docs
Upstream-commit: 313502488e8809910127891d8923672baf43a742
Component: engine
2016-11-22 22:47:38 +01:00
4c1ce8ff4b Merge pull request #28698 from YuPengZTE/devErrot
error strings should not be capitalized or end with punctuation
Upstream-commit: 86eae4018a06c0291f9572cd7f062f320b612698
Component: engine
2016-11-22 21:25:09 +01:00
419cdb27d7 Merge pull request #28595 from anusha-ragunathan/plugin_timeout
Allow HTTP client timeout to be configurable on plugin enable.
Upstream-commit: 677e14643c79184ca9d8123dd3e91e0444b1cac3
Component: engine
2016-11-22 10:17:10 -08:00
e5912f7d7e Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: f0d55cd081c6e8ad2a8222c787d54f9aae15723f
Component: engine
2016-11-22 12:49:38 +00:00
28a6abec82 error strings should not be capitalized or end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: fc11efa2dbf72bb493a24650860220a2d4b07c5e
Component: engine
2016-11-22 14:53:11 +08:00
163c2e9b09 First header should be a top level header
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 1e65db4206ba89af24400fbf9047b25ec98cfd02
Component: engine
2016-11-22 09:33:21 +08:00
c21adc5da9 Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 83ca993c154d56e03d6f95a3f8351c48b3ed3e29
Component: engine
2016-11-21 13:11:40 -08:00
40d5a75060 Merge pull request #28611 from vieux/fix_golint
fix a few golint errors
Upstream-commit: 96f50e9b7087bad25cb38e2985c26b509be0c403
Component: engine
2016-11-19 07:16:44 -05:00
c148947fe6 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 9c559e6d0b7190b4698de59e692a047beba017fd
Component: engine
2016-11-18 18:32:02 -08:00
6038277781 skip api/types/container/ (like golint) and fix one pkg
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 79a891efb7365e4f7d129a0142e66d2852781608
Component: engine
2016-11-18 16:33:50 -08:00
5d1129c013 fix typo
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1f039a66ac55c937f5dfa281a04009626d191f83
Component: engine
2016-11-18 15:51:36 +08:00
169609485f s/bCap/bLen/
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Upstream-commit: 3a0554585177a55802377423bb4529d305b4566f
Component: engine
2016-11-17 21:05:09 +00:00
6ad95c4c59 Fix use of cap in MultiReadSeeker
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Upstream-commit: 158bb9bbd588aa03a3567f40b367025ccbd81fb3
Component: engine
2016-11-17 18:36:35 +00:00
593e5eb2d5 Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7c29f5beed19b55ac8f14880752d4825ba23eccf
Component: engine
2016-11-14 17:41:52 -08:00
1972d4f850 Merge pull request #28365 from wefine/fix-t-errorf
fix t.Errorf to t.Error in serveral _test.go
Upstream-commit: 21051de6e1ba928a08baff505a7d89532b6133eb
Component: engine
2016-11-14 14:46:30 +01:00
7a9630020f fix t.Errorf to t.Error in serveral _test.go
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
Upstream-commit: f78f7de96aebee64b55bb9955fa6c97be2c59662
Component: engine
2016-11-14 17:54:43 +08:00
c22557cc46 Change reading order of tailfile
change reading order from beginning at the end to beginning at a buffer start
added intergration tests for boundary cases
Removed whitespace
Signed-off-by: Shayne Wang <shaynexwang@gmail.com>
Upstream-commit: 63904eb6745d553573ffe8b7cef43dfc0b8a07cf
Component: engine
2016-11-13 20:08:51 -08:00
29d6547bdb Windows: create daemon root with ACL
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 46ec4c1ae2700ed638072fd7fb326afc10eded20
Component: engine
2016-11-10 17:51:28 -08:00
7e73078707 Merge pull request #28238 from ijc25/jsonmessage-urxvt-corruption
pkg/jsonmessage: Avoid undefined ANSI escape codes.
Upstream-commit: 7aeacd35f285ea9376c9949f7688a93f9d601f29
Component: engine
2016-11-10 17:07:01 -08:00
0c5c18d606 pkg/jsonmessage: Avoid undefined ANSI escape codes.
The ANSI escape codes \e[0A (cursor up 0 lines) and \e[0B (cursor down 0 lines)
are not well defined and are treated differently by different terminals. In
particular xterm treats 0 as a missing parameter and therefore defaults to 1,
whereas rxvt-unicode treats these escapes as a request to move 0 lines.

However the use of these codes is unnecessary and were really just hiding the
fact that we were not correctly computing diff when adding a new line. Having
added the new line to the ids map and output the corresponding \n we need to
then calculate a correct diff of 1 rather than leaving it as the default 0
(which xterm then interprets as 1). The fix is to pull the diff calculation out
of the else case and to always do it.

With this in place we can then avoid outputting escapes for moving 0 lines.
Actually diff should never be 0 to start with any more, but check to be safe.

This fixes corruption of `docker pull` seen with rxvt-unicode (and likely other
terminals in that family) seen in #28111. Tested with rxvt-unicode
($TERM=rxvt-unicode), xterm ($TERM=xterm), mlterm ($TERM=mlterm) and aterm
($TERM=kterm).

The test cases have been updated to match the new behaviour.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: b08b437acc3bf52bd2c3435e632ed09f3312e489
Component: engine
2016-11-10 14:10:47 +00:00
9c868a7b94 Merge pull request #27433 from AkihiroSuda/fix-ovl-xfs-ftype0
overlay: warn if overlay backing fs doesn't support d_type
Upstream-commit: 643ac2f804a5242062113ace64bf68506027c9a6
Component: engine
2016-11-09 13:39:07 -08:00
102c65140b Merge pull request #28047 from cpuguy83/27773_chrootarchive_rbind
Fix issue with cp to container volume dir
Upstream-commit: da0ccf8e61e4d5d4005e19fcf0115372f09840bf
Component: engine
2016-11-09 10:52:14 -08:00
af0174a7c5 overlay: warn if overlay backing fs doesn't support d_type
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 2e20e63da2a8a0ffbbb3f2146f87559e17f43046
Component: engine
2016-11-09 07:18:27 +00:00
389ad4c08e Windows: Avoid concurrent access to sysinfo
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 54e09aa4e26c60deb74f994a08e96abea8fb857e
Component: engine
2016-11-08 17:52:38 -08:00
d0ecad688d Remove use of pkg/integration in pkg/idtools
This remove a dependency on `go-check` (and more) when using
`pkg/idtools`. `pkg/integration` should never be called from any other
package then `integration`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: acf7ce1aa0bcaaf0b541b695ce5fbd22676e9239
Component: engine
2016-11-08 17:21:02 +01:00
6fb90ed484 Add functional support for Docker sub commands on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 934328d8ea650bf8a9c3c719999ce2a1f5dd5df6
Component: engine
2016-11-07 09:06:34 -08:00
7379675f65 Merge pull request #27912 from LK4D4/vndr
project: use vndr for vendoring
Upstream-commit: c07234707878412eaaeab252af19adac8cf25d6b
Component: engine
2016-11-03 18:30:19 -07:00
abdf1bbec3 Revert "Update authz plugin list on failure."
This reverts commit fae904af02a184833d2cd5ce9fdd61a4083707c7.

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: a64fc8eea3266968c8e0082dbe6a2f5a8a5bbdc0
Component: engine
2016-11-03 15:49:21 -07:00
61646d77af project: use vndr for vendoring
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f2614f2107c838d014d31b806e3b8a9f1395cb2b
Component: engine
2016-11-03 15:31:46 -07:00
362409ed3f Merge pull request #27331 from Microsoft/jjh/spew
Add spew debugging
Upstream-commit: 02bc2e652b2a254a1afcc66cb32827fa0e65a6fa
Component: engine
2016-11-03 16:36:20 -04:00
d7dd3c497e Merge pull request #27383 from runcom/authz-peercerts
pkg/authorization: send request's TLS peer certificates to plugins
Upstream-commit: 16f6b3e8a9f22df5cbd3454f6e68a8be7e5f04cf
Component: engine
2016-11-03 13:22:29 -07:00
aedb9451a5 Fix issue with cp to container volume dir
In some cases, attempting to `docker cp` to a container's volume dir
would fail due to the volume mounts not existing after performing a
bind-mount on the container path prior to doing a pivot_root.

This does not seem to be effecting all systems, but was found to be a
problem on centos.
The solution is to use an `rbind` rather than `bind` so that any
existing mounts are carried over.

The `MakePrivate` on `path` is no longer neccessary since we are already
doing `MakeRPrivate` on `/`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e6eef7eb4911252c38c829775aa0d510a432476a
Component: engine
2016-11-03 16:01:15 -04:00
a8f159283e Spew debugging
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4c62b1263648833122828cf8cc8259f5b7e32da5
Component: engine
2016-11-03 10:05:11 -07:00
e82a3896c3 Merge pull request #27599 from estesp/getent-path
Add support for looking up user/groups via `getent`
Upstream-commit: 81683e898a53a7bcbcb0e812db640173c3895c28
Component: engine
2016-11-03 15:11:42 +00:00
5e989e429c Merge pull request #27951 from LK4D4/dump_always_to_file
daemon: always dump stack to file
Upstream-commit: 19b5b4aada27e85fc888a576e90aee626bc8bcfa
Component: engine
2016-11-03 00:35:06 -07:00
018c388beb Merge pull request #27918 from dmcgowan/use-system-certs
Merge system certificate pool with custom certificates
Upstream-commit: 1e51f99684be5aa4af52719f95e5870489c8658f
Component: engine
2016-11-02 13:51:58 -07:00
f5432a5e82 daemon: always dump stack to file
Dumping to log is unusable in 90% of cases and inspecting file is much
more convenient.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e5d36586acdd020a0a6d5840ea1fd060b6e3504b
Component: engine
2016-11-02 11:22:43 -07:00
fd88171dba Merge pull request #27705 from dmcgowan/fix-27298
Ensure opaque directory permissions respected
Upstream-commit: bcdce2a6b0d52a18b4eb4a2cb7710b248be88e51
Component: engine
2016-11-02 10:13:30 +01:00
07a831dfc2 Fix logrus formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.

Fixed issue #23459

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: fa710e504b0e3e51d4031790c18621b02dcd2600
Component: engine
2016-10-31 22:05:01 -06:00
90c131c63f Use system ca pool from tlsconfig
Remove deprecated config from local pkg/tlsconfig.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 66a5e34cc4a0bdf654010211baa2070bbe38ba3c
Component: engine
2016-10-31 14:52:07 -07:00
19be62abc4 pkg/authorization: send request's TLS peer certificates to plugins
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1452c1cc718006c72c4b7876d4b3c0a08281074e
Component: engine
2016-10-31 17:37:19 +01:00
34bac6f06e Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e6866492c4492db3bb9546afa2fbaed20f4c1883
Component: engine
2016-10-29 15:03:26 +08:00
dc2dd2dbcb Add support for looking up user/groups via getent
When processing the --userns-remap flag, add the
capability to call out to `getent` if the user and
group information is not found via local file
parsing code already in libcontainer/user.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 6cb8392be9cdc5bf44436a092dd88b39968ffc7d
Component: engine
2016-10-28 19:06:07 -04:00
8d3cacc3b2 Merge pull request #27804 from anusha-ragunathan/blacklist-authz
Blacklist authz plugins that failed.
Upstream-commit: 406c19f0961c5987c8ce3f980b6fbf36e845f9c4
Component: engine
2016-10-28 15:06:20 -07:00
1599ca6ae6 Ensure opaque directory permissions respected
When converting an opaque directory always keep the original
directory tar entry to ensure directory is created with correct
permissions on restore.

Closes #27298

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: daa70195171d798cdfb6c4033b33a06a8f7ebe6c
Component: engine
2016-10-28 13:13:10 -07:00
78119ce904 Update authz plugin list on failure.
When daemon fails to load an authz plugin, it should be removed from
the plugin list. Else the plugin is retried on every request and
response, resulting in undesired behavior (eg. daemon panic)

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: fae904af02a184833d2cd5ce9fdd61a4083707c7
Component: engine
2016-10-28 11:16:06 -07:00
55b1731260 stdcopy: remove logrus debug messages; makes it easier to vendor without the dependency.
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
Upstream-commit: c4be1b117f8226a7aad792c5be315d093adf19cf
Component: engine
2016-10-26 16:29:37 -07:00
3affb6aba8 Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
Upstream-commit: 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
Component: engine
2016-10-26 11:33:06 -04:00