Commit Graph

4715 Commits

Author SHA1 Message Date
b687d7ca5a Merge pull request #33630 from yongtang/167-cli-network-inspect-scope
Add `scope` filter in `GET /networks/(id or name)`
Upstream-commit: 4310f7da7e6bcd8185bf05e032f9b7321cfa6ea2
Component: engine
2017-06-12 18:27:24 -07:00
2ef8445394 Merge pull request #33005 from alfred-landrum/denied-error
Suggest login on pull denial
Upstream-commit: f4bf61c79da153c039e2df586737cd8d54d26a55
Component: engine
2017-06-13 01:51:18 +02:00
aab0327316 Merge pull request #33629 from thaJeztah/disable-v1-registry-by-default
Disable legacy (v1) registries by default
Upstream-commit: df330137207a2895ed324cad9b2a5a3d17793667
Component: engine
2017-06-12 13:11:34 -04:00
99aad7f08b Add scope filter in /networks/<id>
This fix tries to add a `scope` in the query of `/networks/<id>`
(`NetworkInspect`) so that in case of duplicate network names,
it is possible to locate the network ID based on the network
scope (`local`, 'swarm', or `global`).

Multiple networks might exist in different scopes, which is a legitimate case.
For example, a network name `foo` might exists locally and in swarm network.

However, before this PR it was not possible to query a network name `foo`
in a specific scope like swarm.

This fix fixes the issue by allowing a `scope` query in `/networks/<id>`.

Additional test cases have been added to unit tests and integration tests.

This fix is related to docker/cli#167, moby/moby#30897, moby/moby#33561, moby/moby#30242

This fix fixes docker/cli#167

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 158b2a1875cf33f3560dedaeb0149e1fbe54c1ef
Component: engine
2017-06-12 09:54:25 -07:00
e253cdd33c Remove "-e" / "--email" from integration tests
This option is no longer supported in docker 17.06,
so should not be used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a7672b8331b1b96db6390a9356650e67893fbe36
Component: engine
2017-06-12 13:32:47 +02:00
af2183c2c4 Disable legacy (v1) registries by default
Deprecation of interacting with v1 registries was
started in docker 1.8.3, which added a `--disable-legacy-registry`
flag.

This option was anounced to be the default starting
with docker 17.06, and v1 registries completely
removed in docker 17.12.

This patch updates the default, and disables
interaction with v1 registres by default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 128280013f2ad90520c97b47a787be0db883e870
Component: engine
2017-06-12 11:04:28 +02:00
83a1ff66bd Suggest login on pull denial
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
Upstream-commit: 8d9f51ea55c8c9373d20bcc7561ca34c59aaf8c2
Component: engine
2017-06-09 12:43:21 -07:00
ae3f3a569b Merge pull request #32122 from allencloud/choose-rpc-code-to-determine-status-code
choose rpc code to determine status code
Upstream-commit: 27ca921db1d2b4f19fa60a5d7994fec29fb2d025
Component: engine
2017-06-09 14:32:24 +02:00
042ba9639d Merge pull request #33577 from crosbymichael/revert-ONCLR
Revert ONCLR and OPOST changes
Upstream-commit: cd35e4beee13a7c193e2a89008cd87d38fcd0161
Component: engine
2017-06-07 21:50:38 -07:00
f3ef17e47d Revert ONCLR and OPOST changes
This reverts to a version of runc without the ONCLR cleared to not cause
a regression with different clients using --tty.

This also reverts the OPOST changes to the term package to support the
initial change.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a5e83836a49547b2add871bb52cbd8bfedb57114
Component: engine
2017-06-07 13:14:52 -07:00
7911166df9 Service alias should not be copied to task alias
If a service alias is copied to task, then the DNS resolution on the
service name will resolve to service VIP and all of Task-IPs and that
will break the concept of vip based load-balancing resulting in all the
dns-rr caching issues.

This is a regression introduced in #33130

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 38c15531501578b96d34be5ce7f33a0be6be078f
Component: engine
2017-06-07 13:05:15 -07:00
a7fe10a440 Fix Cache with ONBUILD
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f1ade82d82e6436971c6b7d08eb1da57ed9ba756
Component: engine
2017-06-06 10:52:29 -04:00
9244630a6b choose rpc code to determine status code
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: f257f77c6c13ee851d3b899f8d51628a5dec92db
Component: engine
2017-06-06 10:08:50 +08:00
4358607de5 Fix ONBUILD COPY
the source was missing from the second dispatch

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3f2604157790408acf5ad05c74cebe105f2b6979
Component: engine
2017-06-02 17:47:03 -04:00
9c0a0d808c Merge pull request #33438 from vdemeester/remove-cli-flags
Remove `cli/flags` package
Upstream-commit: aebcdf21b198f1ebaa7bb047282112b74f9f4490
Component: engine
2017-06-02 17:20:05 +02:00
d6016b7163 Merge pull request #33474 from mlaventure/test-with-actual-cli-version
Use actual cli version for TestConfigHTTPHeader
Upstream-commit: 986510951ae3c1accb7c6be2993f54300edcad77
Component: engine
2017-06-01 16:18:04 -07:00
10e27f6561 Merge pull request #33335 from cpuguy83/33334_check_unset_sig
Check signal is unset before using user stopsignal
Upstream-commit: 872e28bb1452c6e333549a55dcb651fcff2a6bd1
Component: engine
2017-06-01 23:10:16 +02:00
1fd0a9619a Remove cli/flags package
- Moving the `common*.go` files in `cmd/dockerd` directly (it's the
  only place it's getting used)
- Rename `cli/flags` to `cli/config` because it's the only thing left
  in that package 👼

Now, `integration-cli` does *truly* not depend on `cobra` stuff.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9ff9a91ab7f964f4e5042f94fe22dd50b5c3d832
Component: engine
2017-06-01 13:34:31 -07:00
be69462c28 Use actual cli version for TestConfigHTTPHeader
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 0b90edc22fa95e04b4d3208a72bb276be699b260
Component: engine
2017-06-01 09:35:30 -07:00
02f992f2b8 Fix Typos: continer,contianer -> container
Signed-off-by: Chen Min <chenmin46@huawei.com>
Upstream-commit: 2b62eb434be4770c101ef79666a952fd7f43a742
Component: engine
2017-06-01 19:21:01 +08:00
02dca610a4 Merge pull request #33249 from ripcurld0/env_validate
Add container environment variables correctly to the health check
Upstream-commit: 7c2f20107a0599008152179a18cc8d0323ccc589
Component: engine
2017-05-31 07:35:28 -07:00
0a1989cb37 Check signal is unset before using user stopsignal
This fixes an issue where if a stop signal is set, and a user sends
SIGKILL, `container.ExitOnNext()` is not set, thus causing the container
to restart.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 114652ab86609e5c0cbfad84f642942b466a0596
Component: engine
2017-05-30 13:04:36 -04:00
7502b7e1e9 Merge pull request #33411 from vdemeester/move-configdir-away
Move cli.Configdir away (in `flags`).
Upstream-commit: 599f207b45e74648a8a6a7ac87d77e40930504e9
Component: engine
2017-05-30 11:49:40 +02:00
58ecec6e8e Move cli.Configdir away (in flags).
This makes integration not depend anymore of `cli` and thus not
require `cobra` and other packages to compile.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 71d60ec0eb7eeddc73d2cf63748ab7debe3f06af
Component: engine
2017-05-29 16:22:33 -07:00
7acd97d8f9 Merge pull request #33257 from mtesselH/master
Add CreatedAt filed to volume. Display when volume is inspected.
Upstream-commit: 79b19c2e16c43f22187538953f49b2c048b063f8
Component: engine
2017-05-29 10:48:07 +01:00
3d97792442 Add CreatedAt filed to volume. Display when volume is inspected.
Closes #32663 by adding CreatedAt field when volume is created.
Displaying CreatedAt value when volume is inspected
Adding tests to verfiy the new field is correctly populated

Signed-off-by: Marianna <mtesselh@gmail.com>

Moving CreatedAt tests from the CLI

Moving the tests added for the newly added CreatedAt field for Volume, from CLI to API tests

Signed-off-by: Marianna <mtesselh@gmail.com>
Upstream-commit: a46f757c4043031379362c5d6b3bad7562ab9fed
Component: engine
2017-05-26 11:47:02 -07:00
1fc413c063 Merge pull request #33320 from sbko/33138-generic-api-error-messages
Stop referring CLI flags in error messages if API client is unknown
Upstream-commit: a2f3f6660d08dfb667f091e0fd8454c815dd1c81
Component: engine
2017-05-25 10:48:29 -07:00
4b25f2f51d Merge pull request #33061 from dnephin/refactor-builder-probe-cache
[Builder] Refactor builder probe cache and container backend
Upstream-commit: 8d20641d43a05ee04dad0818ac51d5319a8e5e30
Component: engine
2017-05-25 10:10:49 -07:00
bdc8240507 Fix request.SockRequestRaw error check
We should check for error before reading the response (response can be
nil, and thus this would panic)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 45e0376ea361811b2f5d0653a6b103dd39653371
Component: engine
2017-05-23 12:48:22 -07:00
850d525b5f Extract imageProber and ContainerBackend from Builder
Extract a common function for builder.createContainer
Extract imageCache for doing cache probes
Removes the cacheBuested field from Builder
Create a new containerManager class which reduces the interface between the
builder and managing containers to 3 functions (from 6)

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 19f3b0715cf89f336efa286ea1d3f8b57d8c4973
Component: engine
2017-05-23 15:12:58 -04:00
cc72dd2445 Stop referring CLI flags in error messages if API client is unknown
Signed-off-by: Stanislav Bondarenko <stanislav.bondarenko@gmail.com>
Upstream-commit: 92291a7355dff35be70b5d0ebf634f0232ca6a94
Component: engine
2017-05-22 18:50:49 -04:00
a5644c91a3 Add container environment variables correctly to the health check
The health check process doesn't have all the environment
varialbes in the container or has them set incorrectly.

This patch should fix that problem.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 5836d86ac4d617e837d94010aa60384648ab59ea
Component: engine
2017-05-21 21:39:00 +03:00
caad7b9331 Event tests need to wait for events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 59b2d0473af5155bb31adcc17bc36857ebd13a15
Component: engine
2017-05-19 12:14:50 -07:00
d490134960 Update CLI commit hash
Since this new version of the CLI resolves image digests for swarm
services by default, and we do not want integration tests to talk to
Docker Hub, update CLI tests to suppress this behavior.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d012569b78c27e6e52bc5006d9a1d7a2099b1c2b
Component: engine
2017-05-18 12:23:28 -07:00
5f22605796 support cluster events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 59d45c384a2de7bca73296ce1471646db14cb0c8
Component: engine
2017-05-17 11:46:30 -07:00
0e311d1c4e Merge pull request #33151 from nwt/push-foreign-layers
Add daemon option to push foreign layers
Upstream-commit: a30ef99e8dd2c3e7a54b6410a5709f61db59c07f
Component: engine
2017-05-17 02:04:31 +02:00
67b57727bd Add daemon option to push foreign layers
The --allow-nondistributable-artifacts daemon option specifies
registries to which foreign layers should be pushed.  (By default,
foreign layers are not pushed to registries.)

Additionally, to make this option effective, foreign layers are now
pulled from the registry if possible, falling back to the URLs in the
image manifest otherwise.

This option is useful when pushing images containing foreign layers to a
registry on an air-gapped network so hosts on that network can pull the
images without connecting to another server.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
Upstream-commit: 67fdf574d5acd6ddccb6ece0ffe0ace1c1608712
Component: engine
2017-05-16 14:36:36 -07:00
2952e551a8 Merge pull request #32490 from aaronlehmann/start-first-test-failure
Increase health check timeout for TestAPISwarmServicesUpdateStartFirst
Upstream-commit: df4ca50805baa1d1488d811e82125f607c8daa09
Component: engine
2017-05-15 16:23:05 -07:00
81db28deb9 Merge pull request #32996 from dperny/service-logs-support-details
Fix Ambigious Logs Format and Add Support for Details in Service Logs
Upstream-commit: 7fd8a9382c0fd3f23002288e357b5612b869a974
Component: engine
2017-05-15 13:57:44 +02:00
6879ffc828 Merge pull request #33146 from Microsoft/jjh/TestAPIStatsNoStreamGetCpu
Fix flaky TestAPIStatsNoStreamGetCpu
Upstream-commit: 8a03eb0b6cc56879eada4a928c6314f33001fc83
Component: engine
2017-05-15 11:21:53 +02:00
418f2b9f51 Merge pull request #33179 from tonistiigi/fix-from-scratch
Fix resetting image metadata between stages for scratch case
Upstream-commit: 4e0fdc9098e2ff9e4e78287f8d60aef8af465d55
Component: engine
2017-05-13 21:17:02 -07:00
537a743ad7 Merge pull request #33182 from cyli/exclusive-root-pools-in-daemon
Use exclusive root pools if a CA cert file is specified in the daemon
Upstream-commit: 190c6e8cf8b893874a33d83f78307f1bed0bfbcd
Component: engine
2017-05-13 21:15:42 -07:00
a00f1ffcd6 Merge pull request #32874 from cpuguy83/metrics_plugins
Add support for metrics plugins
Upstream-commit: 680084b2a2eb1ac1ced2dd4c695fdc469c25dc7f
Component: engine
2017-05-12 15:44:34 -07:00
deaa6eb130 Use exclusive root pools if a CA cert file is specified in the daemon
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: ddd5278b07b1c2b12b906244153fd9340e0d7910
Component: engine
2017-05-12 14:43:34 -07:00
033ef466ec Fix resetting image metadata between stages for scratch case
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b192218503427a49b6de0a093e38e2697a22427a
Component: engine
2017-05-12 12:00:55 -07:00
51fcae249a Change log details encoding format and support details on service logs
URL query encode log details, so that characters like spaces don't make
log parsing ambiguous. Add a helper function to parse these details to a
map, if needed

Add support for details on service logs

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 68f21418ac1f1acb2874b45878a5938475becf1f
Component: engine
2017-05-12 10:53:44 -07:00
31f26ea6ab TestAPISwarmServicesUpdateStartFirst: Increase timeout on health check command
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 47436e9628149e7077a8e89c2fcac2a8f85bc62a
Component: engine
2017-05-12 10:42:29 -07:00
d7fd55d70a Merge pull request #32993 from cyli/root-rotation-cli
API changes to rotate swarm root CA
Upstream-commit: eb8abc95985bf3882a4a177c409a96e36e25f5b7
Component: engine
2017-05-12 10:12:32 -07:00
e9abb077b7 Add support for metrics plugins
Allows for a plugin type that can be used to scrape metrics.
This is useful because metrics are not neccessarily at a standard
location... `--metrics-addr` must be set, and must currently be a TCP
socket.
Even if metrics are done via a unix socket, there's no guarentee where
the socket may be located on the system, making bind-mounting such a
socket into a container difficult (and racey, failure-prone on daemon
restart).

Metrics plugins side-step this issue by always listening on a unix
socket and then bind-mounting that into a known path in the plugin
container.

Note there has been similar work in the past (and ultimately punted at
the time) for consistent access to the Docker API from within a
container.

Why not add metrics to the Docker API and just provide a plugin with
access to the Docker API? Certainly this can be useful, but gives a lot
of control/access to a plugin that may only need the metrics. We can
look at supporting API plugins separately for this reason.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0e8e8f0f318656be80e34db9b5e390ffeef3fd0d
Component: engine
2017-05-12 00:30:09 -04:00
887d3ac7d1 Merge pull request #33108 from justincormack/revert-seccomp-sockets
Revert "Block obsolete socket families in the default seccomp profile"
Upstream-commit: 33ebf32cb0d0b865d002e8afd0c35b6474f04eb6
Component: engine
2017-05-12 00:30:08 +02:00