Commit Graph

2167 Commits

Author SHA1 Message Date
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
c0eb6c852a Merge pull request #27747 from Microsoft/jjh/clientisolationcomment
Windows: Add comment for containers on client SKUs
Upstream-commit: ff6db320f8a411d4a8b36a89ac28a85c453905ea
Component: engine
2016-10-25 13:37:25 -07:00
f83bc80e97 Windows: Add comment re client containers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 87ab13add40ef616dbfc1cd00742f650343869cc
Component: engine
2016-10-25 10:30:00 -07:00
ccce8d9194 mkdirall on the PID file path
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 745f3ece53cc037030c0618f75f2cd551baa1b6c
Component: engine
2016-10-25 09:11:20 -07:00
accc5bf3d7 Merge pull request #27609 from tonistiigi/fix-chroot-shared-parent
chroot: remount everything as private in new mntns
Upstream-commit: 87ae571fed06193a319c6776bfd19cc64067e511
Component: engine
2016-10-21 14:40:40 -07:00
d87cb9a48f Merge pull request #27522 from vieux/data_race_plugins
prevent data race in pkg/plugins
Upstream-commit: d0e6dae233e0f66aa969a2ac3d28685c365cdf6c
Component: engine
2016-10-21 14:19:48 -07:00
f449f9bc63 prevent data race in pkg/plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: f7af80860cf99ce808834260ac190a2a88bc24e2
Component: engine
2016-10-21 13:28:13 -07:00
6c158febcb Merge pull request #27613 from stevvooe/archive-package-cleanup
pkg/archive: remove unnecessary Archive and Reader type
Upstream-commit: bc52939b0455116ab8e0da67869ec81c1a1c3e2c
Component: engine
2016-10-20 20:56:23 -07:00
fe1dce6a91 pkg/archive: remove unnecessary Archive and Reader type
The `archive` package defines aliases for `io.ReadCloser` and
`io.Reader`. These don't seem to provide an benefit other than type
decoration. Per this change, several unnecessary type cases were
removed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: aa2cc18745cbe0231c33782f0fa764f657e3fb88
Component: engine
2016-10-20 19:31:24 -07:00
3b85a5f98c Merge pull request #27606 from stevvooe/no-pool-pointer
pkg/pool: no need for double pointer for sync.Pool
Upstream-commit: 2e742b022190dbd0d2897b9c2bd3da2f045d708e
Component: engine
2016-10-20 17:03:41 -07:00
f8d146b07d chroot: let root be cleaned up by kernel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 70dfea63ba2a8a6d8b367420039aeb6a1759c240
Component: engine
2016-10-20 15:50:46 -07:00
253426676c chroot: remount everything as private in new mntns
If parent of the destination path is shared, this
path will be unmounted from the parent ns even if
the path itself is private.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b511d1f0cabd32ca30c87fa1bbc7ecac283dab39
Component: engine
2016-10-20 15:29:23 -07:00
0f8d925c2d pkg/pool: no need for double pointer for sync.Pool
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 836f347cb04f28ee80bb5d877c5599f91ed1ef60
Component: engine
2016-10-20 15:27:38 -07:00
56af301200 Merge pull request #27287 from mavenugo/pluginv2-sk2
Allow multiple handlers to support network plugins in swarm-mode 
Upstream-commit: 2c620d0aa24c5f774a9115449a86b158b005bba8
Component: engine
2016-10-20 13:43:04 -07:00
8fb804fc58 Fix the typo of URLs
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Upstream-commit: fa378413f88054d0a336d675e7280930ddc86cb2
Component: engine
2016-10-19 17:46:27 +08:00
3643ef102a Merge pull request #27267 from ezrasilvera/plugin_fix
Call the AuthZRes function also when the daemon  returns error
Upstream-commit: 194f04bbbe5b4de06235bf56b8842cadac0294dc
Component: engine
2016-10-18 21:53:43 -07:00
1050d22554 Allow plugins to have multiple handlers
Currently the plugins pkg allows a single handler. This assumption
breaks down if there are mutiple listeners to a plugin of a certain
Manifest such as NetworkDriver or IpamDriver when swarm-mode is enabled.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 5e9c78aeaf1d88000921190b88a1d91d6261208c
Component: engine
2016-10-17 09:00:17 -07:00
6d715e3038 Fix broken JSON support in cli/command/formatter
How to test:

    $ docker ps --format '{{json .}}'
    $ docker network ls --format '{{json .}}'
    $ docker volume ls --format '{{json .}}'

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 3a32b587922eca87d1ab23689f407b75a8603ccb
Component: engine
2016-10-17 08:07:17 +00:00
e063aa0187 Merge pull request #27366 from morelena/use_contains
all: use strings.Contains instead Index
Upstream-commit: 21a79b503a5c1331d0c000d26179a55fc235b021
Component: engine
2016-10-13 18:44:30 -07:00
70177b59a1 all: use strings.Contains instead Index
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
Upstream-commit: a37027f6bdcb2f035fcccd99c6c6064934623a04
Component: engine
2016-10-13 15:55:41 -07:00
b1d937a58f Merge pull request #27365 from morelena/remove_nil_check
all: remove nil check for slices
Upstream-commit: 245bd4c3d2594fae3fd5099f29eef528a4c4accd
Component: engine
2016-10-13 15:27:37 -07:00