Commit Graph

4728 Commits

Author SHA1 Message Date
e529bcd027 Implement incremental file sync using client session
Also exposes shared cache and garbage collection/prune
for the source data.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 5c3d2d552b0430672d5f481ab2d37036f6e92166
Component: engine
2017-06-22 11:52:35 -07:00
b1e4d7d884 Add long-running client session endpoint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ec7b6238c31e26702ecf366731532e189b5da142
Component: engine
2017-06-22 11:22:41 -07:00
d3db128900 builder: fix copy —from conflict with force pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c268d9da4b658b2dd1fe48010a8929b603913e92
Component: engine
2017-06-20 15:45:33 -07:00
8c7c972d20 Merge pull request #33454 from dnephin/refactor-builder-remove-copy-on-build
[Builder] Move file coping from the daemon to the builder
Upstream-commit: 99c72eb2682c0539ad3cc544eb28876af78b33a1
Component: engine
2017-06-20 10:12:57 +02:00
d01b45b0ff Redact the swarm's spec's signing CA cert when getting swarm info, because
otherwise if the user gets the info from the API, makes a non-CA related change,
then updates, swarm will interpret this as the user trying to remove the signing
key from the swarm.  We are redacting due to usability reasons, not because
the signing cert is secret.  The signing KEY is secret, hence it's redacted.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: bdfbd22afbbf16a07f0316656c6c17453df3e0f7
Component: engine
2017-06-15 18:26:01 -07:00
f816b75526 Merge pull request #33302 from cpuguy83/fix_logs_racey_test_win
Make TestLogsAPIStdout a bit less racey
Upstream-commit: 6d92b0ee15cff0d5fade6533f696c7bc9f314021
Component: engine
2017-06-14 16:35:22 -07:00
3c78860ecb Merge pull request #33637 from thaJeztah/improve-ci-build-time
Minor refactor/cleanup of tests
Upstream-commit: 7fdc2e42d1d8eadf38976c3363b994040ad28fa5
Component: engine
2017-06-14 19:45:48 +02:00
25eae686e2 Merge pull request #33621 from thaJeztah/fix-runc-version-exec
Fix missing "--version" argument
Upstream-commit: 5052986afc43788ce96604ea5aa2e441a11b1a89
Component: engine
2017-06-13 14:18:17 +02:00
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
01267bd230 Simplify DockerRegistrySuite.TestUserAgentPassThrough()
This patch simplifies the test by;

- re-using the registry-mock / handler
- skipping the last `docker build`, which was only
  used to make sure a local image was present. Instead,
  the daemon is started with a `busybox` image loaded.

Also added a comment, explaining why the mock always
returns a 404 (hence, error/output-string should not
be checked in the test), and made the mock return a
valid/correctly formatted error response.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5d04fe73bf9fa7cff1b99206f39536aed807efb3
Component: engine
2017-06-12 20:18:03 +02:00
f3ddace468 Use tempdir instead of working directory as build-context
The `makefile()` utility was used to create a temporary Dockerfile, and after
tests completed, this file was deleted.

However, the _build_ used the current path (`/usr/local/bin/docker`) as
build-context. As a result, roughtly 20 MB was sent as build-context for each
build, but none of the builds actually required a build-context.

This patch;

- creates a temp-dir for the test, which can be used as build-context
- changes the `makefile()` utility and removes the `cleanup` functionality
- instead, the `temp-dir` is removed after the test finishes (which also removes the temporary `Dockerfile`)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ebe66b1d0f52dc58a98a428d4efa4d2f2743b96e
Component: engine
2017-06-12 20:14:48 +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
bf95ed2bb9 Fix missing "--version" argument
Commit 858b4b44c8172eb2c92767c8f624f4138db5212b added
support for obtaining the runtime version
if a custom path was set, but accidentally
removed the "--version" flag.

This patch restores the flag, and adds an integration
test to verify the behavior..

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6400ce8f0a97e456f9694396f58c0958f3580277
Component: engine
2017-06-11 23:31:47 +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
13d2adae3f Fix copy when used with scratch and images with empty RootFS
Commit the rwLayer to get the correct DiffID
Refacator copy in thebuilder
move more code into exportImage
cleanup some windows tests
Release the newly commited layer.
Set the imageID on the buildStage after exporting a new image.
Move archiver to BuildManager.
Have ReleaseableLayer.Commit return a layer
and store the Image from exportImage in the local imageSources cache
Remove NewChild from image interface.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 51360965206b0db49cc0365dabb590063a17a9df
Component: engine
2017-06-08 15:07:16 -04: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
b1f02f908e Make TestLogsAPIStdout a bit less racey
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 960b8d9294356b5651938244a62e0d485da72211
Component: engine
2017-05-19 10:17:54 -04: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