Commit graph

4725 commits

Author SHA1 Message Date
Vincent Demeester
99c72eb268 Merge pull request #33454 from dnephin/refactor-builder-remove-copy-on-build
[Builder] Move file coping from the daemon to the builder
2017-06-20 10:12:57 +02:00
Ying Li
bdfbd22afb 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>
2017-06-15 18:26:01 -07:00
Aaron Lehmann
6d92b0ee15 Merge pull request #33302 from cpuguy83/fix_logs_racey_test_win
Make TestLogsAPIStdout a bit less racey
2017-06-14 16:35:22 -07:00
Vincent Demeester
7fdc2e42d1 Merge pull request #33637 from thaJeztah/improve-ci-build-time
Minor refactor/cleanup of tests
2017-06-14 19:45:48 +02:00
Sebastiaan van Stijn
5052986afc Merge pull request #33621 from thaJeztah/fix-runc-version-exec
Fix missing "--version" argument
2017-06-13 14:18:17 +02:00
Aaron Lehmann
4310f7da7e Merge pull request #33630 from yongtang/167-cli-network-inspect-scope
Add `scope` filter in `GET /networks/(id or name)`
2017-06-12 18:27:24 -07:00
Sebastiaan van Stijn
f4bf61c79d Merge pull request #33005 from alfred-landrum/denied-error
Suggest login on pull denial
2017-06-13 01:51:18 +02:00
Sebastiaan van Stijn
5d04fe73bf
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>
2017-06-12 20:18:03 +02:00
Sebastiaan van Stijn
ebe66b1d0f
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>
2017-06-12 20:14:48 +02:00
Kenfe-Mickaël Laventure
df33013720 Merge pull request #33629 from thaJeztah/disable-v1-registry-by-default
Disable legacy (v1) registries by default
2017-06-12 13:11:34 -04:00
Yong Tang
158b2a1875 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>
2017-06-12 09:54:25 -07:00
Sebastiaan van Stijn
a7672b8331
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>
2017-06-12 13:32:47 +02:00
Sebastiaan van Stijn
128280013f
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>
2017-06-12 11:04:28 +02:00
Sebastiaan van Stijn
6400ce8f0a
Fix missing "--version" argument
Commit 858b4b44c8 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>
2017-06-11 23:31:47 +02:00
Alfred Landrum
8d9f51ea55
Suggest login on pull denial
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
2017-06-09 12:43:21 -07:00
Sebastiaan van Stijn
27ca921db1 Merge pull request #32122 from allencloud/choose-rpc-code-to-determine-status-code
choose rpc code to determine status code
2017-06-09 14:32:24 +02:00
Daniel Nephin
5136096520 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>
2017-06-08 15:07:16 -04:00
Victor Vieux
cd35e4beee Merge pull request #33577 from crosbymichael/revert-ONCLR
Revert ONCLR and OPOST changes
2017-06-07 21:50:38 -07:00
Michael Crosby
a5e83836a4 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>
2017-06-07 13:14:52 -07:00
Madhu Venugopal
38c1553150 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>
2017-06-07 13:05:15 -07:00
Daniel Nephin
f1ade82d82 Fix Cache with ONBUILD
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-06 10:52:29 -04:00
allencloud
f257f77c6c choose rpc code to determine status code
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-06 10:08:50 +08:00
Daniel Nephin
3f26041577 Fix ONBUILD COPY
the source was missing from the second dispatch

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 17:47:03 -04:00
Sebastiaan van Stijn
aebcdf21b1 Merge pull request #33438 from vdemeester/remove-cli-flags
Remove `cli/flags` package
2017-06-02 17:20:05 +02:00
Vincent Demeester
986510951a Merge pull request #33474 from mlaventure/test-with-actual-cli-version
Use actual cli version for TestConfigHTTPHeader
2017-06-01 16:18:04 -07:00
Sebastiaan van Stijn
872e28bb14 Merge pull request #33335 from cpuguy83/33334_check_unset_sig
Check signal is unset before using user stopsignal
2017-06-01 23:10:16 +02:00
Vincent Demeester
9ff9a91ab7
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>
2017-06-01 13:34:31 -07:00
Kenfe-Mickael Laventure
0b90edc22f Use actual cli version for TestConfigHTTPHeader
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-01 09:35:30 -07:00
Chen Min
2b62eb434b Fix Typos: continer,contianer -> container
Signed-off-by: Chen Min <chenmin46@huawei.com>
2017-06-01 19:21:01 +08:00
Kenfe-Mickaël Laventure
7c2f20107a Merge pull request #33249 from ripcurld0/env_validate
Add container environment variables correctly to the health check
2017-05-31 07:35:28 -07:00
Brian Goff
114652ab86 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>
2017-05-30 13:04:36 -04:00
Sebastiaan van Stijn
599f207b45 Merge pull request #33411 from vdemeester/move-configdir-away
Move cli.Configdir away (in `flags`).
2017-05-30 11:49:40 +02:00
Vincent Demeester
71d60ec0eb
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>
2017-05-29 16:22:33 -07:00
Sebastiaan van Stijn
79b19c2e16 Merge pull request #33257 from mtesselH/master
Add CreatedAt filed to volume. Display when volume is inspected.
2017-05-29 10:48:07 +01:00
Marianna
a46f757c40 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>
2017-05-26 11:47:02 -07:00
Vincent Demeester
a2f3f6660d Merge pull request #33320 from sbko/33138-generic-api-error-messages
Stop referring CLI flags in error messages if API client is unknown
2017-05-25 10:48:29 -07:00
Vincent Demeester
8d20641d43 Merge pull request #33061 from dnephin/refactor-builder-probe-cache
[Builder] Refactor builder probe cache and container backend
2017-05-25 10:10:49 -07:00
Vincent Demeester
45e0376ea3
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>
2017-05-23 12:48:22 -07:00
Daniel Nephin
19f3b0715c 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>
2017-05-23 15:12:58 -04:00
Stanislav Bondarenko
92291a7355 Stop referring CLI flags in error messages if API client is unknown
Signed-off-by: Stanislav Bondarenko <stanislav.bondarenko@gmail.com>
2017-05-22 18:50:49 -04:00
Boaz Shuster
5836d86ac4 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>
2017-05-21 21:39:00 +03:00
Dong Chen
59b2d0473a Event tests need to wait for events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-05-19 12:14:50 -07:00
Brian Goff
960b8d9294 Make TestLogsAPIStdout a bit less racey
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-19 10:17:54 -04:00
Aaron Lehmann
d012569b78 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>
2017-05-18 12:23:28 -07:00
Dong Chen
59d45c384a support cluster events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-05-17 11:46:30 -07:00
Sebastiaan van Stijn
a30ef99e8d Merge pull request #33151 from nwt/push-foreign-layers
Add daemon option to push foreign layers
2017-05-17 02:04:31 +02:00
Noah Treuhaft
67fdf574d5 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>
2017-05-16 14:36:36 -07:00
Aaron Lehmann
df4ca50805 Merge pull request #32490 from aaronlehmann/start-first-test-failure
Increase health check timeout for TestAPISwarmServicesUpdateStartFirst
2017-05-15 16:23:05 -07:00
Sebastiaan van Stijn
7fd8a9382c Merge pull request #32996 from dperny/service-logs-support-details
Fix Ambigious Logs Format and Add Support for Details in Service Logs
2017-05-15 13:57:44 +02:00
Vincent Demeester
8a03eb0b6c Merge pull request #33146 from Microsoft/jjh/TestAPIStatsNoStreamGetCpu
Fix flaky TestAPIStatsNoStreamGetCpu
2017-05-15 11:21:53 +02:00