Commit Graph

4754 Commits

Author SHA1 Message Date
7deeee36b6 Remove client/session package, depend on buildkit's session package
gofmt -w -r '"github.com/docker/docker/client/session" -> "github.com/moby/buildkit/session"'
gofmt -w -r '"github.com/docker/docker/client/session/filesync" -> "github.com/moby/buildkit/session/filesync"'

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 41445a4745451b99d1c361c6c87447da790cb01b
Component: engine
2017-07-28 16:34:23 -07:00
416ca06159 Windows: Disable TestAttachTTYWithoutStdin
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e4ec9195fed2f3653ec6d0a2b1c9ca6b0e2b9c37
Component: engine
2017-07-18 14:23:23 -07:00
4bd74593a1 Merge pull request #34085 from cpuguy83/tests_use_locally_built_plugin
Use local plugins, not from hub for tests
Upstream-commit: f9091195823dc409e7c0fff633c59f7a9998f4a7
Component: engine
2017-07-18 10:47:58 +02:00
5d957152ba Testing: Use local plugins, not from hub
Use the (new) plugin fixtures for plugin tests rather than pulling
plugins from hub.

This removes the restriction for platforms/archs since plugin binaries
get built in the test environment.

Future work would be to add test plugins for the various subsystems so
tests that are actually using plugins (e.g. volumes, networks) can be
ported to use the fixtures as well.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 15a538a627e1d0898862c9e6ca7472cd7fb517ce
Component: engine
2017-07-14 13:24:14 -04:00
2015772003 Merge pull request #34027 from cpuguy83/15853_allow_stopping_paused_container
Allow stopping of paused container
Upstream-commit: 6fdb2fb069b985f244eb227828b00a940ee9de84
Component: engine
2017-07-13 10:16:46 +08:00
7aed75f09c Allow stopping of paused container
When a container is paused, signals are sent once the container has been
unpaused.
Instead of forcing the user to unpause a container before they can ever
send a signal, allow the user to send the signals, and in the case of a
stop signal, automatically unpause the container afterwards.

This is much safer than unpausing the container first then sending a
signal (what a user is currently forced to do), as the container may be
paused for very good reasons and should not be unpaused except for
stopping.
Note that not even SIGKILL is possible while a process is paused,
but it is killed the instant it is unpaused.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c3feb046b9b1eb606cc7e853d020799eb3800e0e
Component: engine
2017-07-12 10:35:48 -04:00
c30b5760e3 Merge pull request #34032 from allencloud/support-config-event-in-cluster
make engine support cluster config event
Upstream-commit: 334702ab1fa8d3d6c64f3c41d80752c7b4196357
Component: engine
2017-07-11 20:25:19 -07:00
e95f4619cd [project] change syscall to /x/sys/unix|windows
Changes most references of syscall to golang.org/x/sys/
Ones aren't changes include, Errno, Signal and SysProcAttr
as they haven't been implemented in /x/sys/.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>

[s390x] switch utsname from unsigned to signed

per 33267e036f
char in s390x in the /x/sys/unix package is now signed, so
change the buildtags

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 069fdc8a083cb1663e4f86fe3fd9b9a1aebc3e54
Component: engine
2017-07-11 08:00:32 -04:00
94a5aefc94 make engine support cluster config event
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ed916a233c577693afc8dc3122311c15246d00cc
Component: engine
2017-07-11 17:21:15 +08:00
4cb9d45e3f Merge pull request #33541 from aaronlehmann/lock-unlock-tests-poll
integration-cli: Replace sleeps with polling in swarm lock/unlock tests
Upstream-commit: ced0b6cb5bd3acd223dc20a13ba5be1dbf0ff643
Component: engine
2017-07-07 16:41:01 -07:00
c782cb6c44 Make plugin emit strongly typed, consumable events
Enables other subsystems to watch actions for a plugin(s).

This will be used specifically for implementing plugins on swarm where a
swarm controller needs to watch the state of a plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 72c3bcf2a533a827402945e3a55872e2db4fb024
Component: engine
2017-07-06 14:26:06 -04:00
096ae0539f Merge pull request #33898 from crosbymichael/swappiness
Do not set -1 for swappiness
Upstream-commit: 490b55e8fa73be4c78de0118fe63a7ce5dc0f383
Component: engine
2017-07-05 17:04:08 -07:00
ec1ee882b3 Merge pull request #33322 from jsoref/spelling
Spelling
Upstream-commit: ff4f700f74450018f36d014f3cde0ff1b9c17fb3
Component: engine
2017-07-04 15:46:34 +02:00
bfb65fa0bb Merge pull request #33830 from cpuguy83/33799_fix_plugin_mounts_issue
Make plugin removes more resilient to failure
Upstream-commit: 48adb9d9549b8e5c4e9fd34335161c7676395e5a
Component: engine
2017-07-03 18:37:31 -07:00
643654c2f0 Spelling fixes
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 39bcaee47b8a284a46b761afe218ba7deda0d482
Component: engine
2017-07-03 13:13:09 -07:00
654d76c922 Do not set -1 for swappiness
Do not set a default value for swappiness as the default value should be
`nil`

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 9d87e6e0fb799d6ef3bb9a97bc523f8d343b5fb3
Component: engine
2017-07-03 11:23:15 -07:00
8e86b3a04f Merge pull request #33875 from tmp6154/master
Change order of arguments in assertion to be more logical
Upstream-commit: 87df0e533b619c088091fd1e2310e92bb9a24822
Component: engine
2017-06-30 14:46:11 -04:00
ab5c937cf4 Merge pull request #33824 from ijc/build-iidfile-with-squash
builder: Emit a BuildResult after squashing.
Upstream-commit: b8766fe793c18149e167b8f9819352a3bfcb0514
Component: engine
2017-06-30 16:42:23 +02:00
7e46ec7067 Make plugin removes more resilient to failure
Before this patch, if the plugin's `config.json` is successfully removed
but the main plugin state dir could not be removed for some reason (e.g.
leaked mount), it will prevent the daemon from being able to be
restarted.

This patches changes this to atomically remove the plugin such that on
daemon restart we can detect that there was an error and re-try. It also
changes the logic so that it only logs errors on restore rather than
erroring out the daemon.

This also removes some code which is now duplicated elsewhere.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 11cf394e5ea964636294a219872b188fe5bdf4dd
Component: engine
2017-06-30 09:58:19 -04:00
0b353a6204 Change order of arguments in assertion to be more logical
Because of argument order to assert, in case of fail, we'll get message
like:

... obtained string = "uid=100(test) gid=101(test)\n"
... expected string = "uid=100(test) gid=101(test) groups=101(test)\n"

But obtained string should be second one, not the first one. And
expected string should be first. Here's sample output from test above:

... Output: before restart 'uid=100(test) gid=101(test)
', after restart 'uid=100(test) gid=101(test) groups=101(test)

It's confusing, because expected order of strings in assertion is
reversed. What goes before restart - should be "expected string" and
what goes after - should be "obtained string".

Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
Upstream-commit: 07cc701947533089fac5fea42e7d5a9a6ea1cfcc
Component: engine
2017-06-29 12:38:13 +03:00
4c52cfc0fb build: fix add from remote url
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2981667e11e24e9e1e61252a40ceb11fd7cb9811
Component: engine
2017-06-27 10:38:01 -07:00
1c2b78478c builder: Emit a BuildResult after squashing.
This ensures that the final BuildResult is the actual tagged image.

Fixes #33822.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 9777ec3be0e3056d0bedcf36052704f832e45759
Component: engine
2017-06-26 13:19:25 +01:00
5b78ab86a3 Merge pull request #31273 from fabiokung/consistent-ro-view
No container locks on `docker ps`
Upstream-commit: 56ad9bb1b4f7463cf1d6eab8b6f924f46ff2c2fe
Component: engine
2017-06-23 15:28:55 -07:00
cd24ef2d4a avoid saving container state to disk before daemon.Register
Migrate legacy volumes (Daemon.verifyVolumesInfo) before containers are
registered on the Daemon, so state on disk is not overwritten and legacy
fields lost during registration.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: 76d96418b13080514f3fb861072b06cb91d71cff
Component: engine
2017-06-23 07:52:34 -07:00
9bf8a3a581 Make tests a bit less flaky
Prevent tests failing when teardown tries to delete a container that is
already being removed.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Upstream-commit: fcb6d37a8dde8a91896116742116e9d9808b18ac
Component: engine
2017-06-23 07:52:32 -07:00
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
5f0ae0b377 integration-cli: Replace sleeps with polling in swarm lock/unlock tests
This will hopefully make the tests more robust by replacing a fixed 3s
sleep with a polling loop that looks at whether the key PEM file is
encrypted or not.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 17173efbe00d422392f91c672350266314808b28
Component: engine
2017-06-06 16:28:40 +03:00