Commit Graph

4789 Commits

Author SHA1 Message Date
4d6d2b530e Turn off plugin upgrade test when userns on
Until volume plugins can be made aware of the remapped root,
interactions with volumes created by plugin will not work as the file
ownership denies permissions to the userns remapped range.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: b1ced2af03c5a8009c314bde80b5f2516e0522fd
Component: engine
2017-08-24 10:52:11 -07:00
80c42a7f96 Merge pull request #33534 from sbko/31410-replace-deprecated-sockrequest
Stop using deprecated SockRequest
Upstream-commit: eb52bb22a4f3b9632545f10c0a3af436aced817d
Component: engine
2017-08-24 11:30:13 -04:00
e48013ec36 Stop using deprecated SockRequest
Signed-off-by: Stanislav Bondarenko <stanislav.bondarenko@gmail.com>
Upstream-commit: 0fd5a654280ef509a6512f84981f28d559869b90
Component: engine
2017-08-23 17:10:04 -04:00
95903f50f1 Host-mode IPC sharing not possible in a userns
This test is the API version of a docker_cli_run_test that was already
disabled from userns, but when ported to API didn't retain the same test
requirements. Specifically, a user namespaced process will not have
access to the host namespace's IPC devices and is already documented as
such in the user namespace restrictions docs.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: d9f3548a936991594095c12b7271ce3387f4025c
Component: engine
2017-08-23 10:37:47 -07:00
eec82cc7b5 Merge pull request #34600 from dnephin/remove-pkg-testutil
Remove pkg/testutil/utils.go
Upstream-commit: 59e1565565071da160a0ad3781335e4f974f93f8
Component: engine
2017-08-23 09:38:20 -07:00
b680839840 *: normalize the use of normalize
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: ae8dbeaeedce3a9f247f2d58df7459f9d79bde5d
Component: engine
2017-08-22 15:25:31 -07:00
f5c5b5cc38 Remove RunCommandPipelineWithOutput
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e885af2a6b6b9f88a8b419d225b1425ec3d9416e
Component: engine
2017-08-22 17:15:26 -04:00
e13afe9c59 Remove RandomTmpDirPath
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9db68f4dea6379b7e85ee5c6f2be080a6fcbe4ca
Component: engine
2017-08-22 17:15:26 -04:00
3177188cce Remove testutil.ParseCgroupPaths
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e8bd67181533222c192cca19a4279c85db48875e
Component: engine
2017-08-22 17:15:26 -04:00
931aa8f0e2 Remove ConsumeWithSpeed
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1455086c4b922f09777aa49ec26a98c463be6a49
Component: engine
2017-08-22 17:15:26 -04:00
56e5cffbc1 Remove testutil.ReadBody
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f304e72a2e4451b043ab1a73a6c44894333c5c7
Component: engine
2017-08-22 17:15:26 -04:00
5e635809d5 Remove ChannelBuffer
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6a0105b452e604866320aad7e2ad291beb7925b9
Component: engine
2017-08-22 17:15:26 -04:00
594cd7054e Remove ListTar
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6ffbe3f6a893a97f534d535538a646d4b79fed03
Component: engine
2017-08-22 17:15:26 -04:00
524d0fa645 Remove testutil.CompareDirectoryEntries and IsKilled
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6151d55ee7301d2b3800d701a9ce4969848e4d6b
Component: engine
2017-08-22 17:15:26 -04:00
b087533ab3 Remove testutil.ConvertSliceOfStringsToMap
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d30e51495a7b748d0d5e73e1b8c7edf5c584c4ef
Component: engine
2017-08-22 17:15:26 -04:00
7cc406aa10 Merge pull request #34572 from krizalys/hyphenless-bind-mount
Dropped hyphen in bind mount where appropriate
Upstream-commit: 28362f11d73b5b72ff9d7eba27cf9f817ec86ef8
Component: engine
2017-08-22 05:11:46 -07:00
1c65c425a3 Merge pull request #34560 from dnephin/remove-some-cli-tests
Remove a couple cli tests, which are now unit tests in docker/cli
Upstream-commit: 361a473121f2cd4e688a3bb71fbeff00aaf674d7
Component: engine
2017-08-19 14:31:05 -07:00
3c66acc139 Dropped hyphen in bind mount where appropriate
Signed-off-by: Christophe Vidal <kriss@krizalys.com>
Upstream-commit: dffa5d6df2e51556edfbcebc4695fdbc0bcc1a90
Component: engine
2017-08-19 21:25:07 +07:00
39c495c1d1 Remove config tests, which are now unit tests in docker/cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c467a112050d595ca0b48122cd4ce81fcf6cefde
Component: engine
2017-08-18 14:24:52 -04:00
de626e10fb Fix golint errors.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9b47b7b1519c5f2138e2933fb1fc459eb00895c0
Component: engine
2017-08-18 14:23:44 -04:00
dc46befdc9 Remove cli-only tests from integration-cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 98d8c96885593f8f085bf9607b7d817e23d7164c
Component: engine
2017-08-17 12:32:49 -04:00
30f1b651e2 Remove string checking in API error handling
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.

Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ebcb7d6b406fe50ea9a237c73004d75884184c33
Component: engine
2017-08-15 16:01:11 -04:00
7eea9c9616 Merge pull request #34109 from yummypeng/rm-link-when-rm-container
Bugfix: Remove links when remove container
Upstream-commit: b6498340b2baa6596553b2b56b43990a365a7b6a
Component: engine
2017-08-15 09:43:00 -04:00
99367ff683 Merge pull request #34087 from kolyshkin/ipcmode
Implement private and shareable ipc modes
Upstream-commit: bb6fc72cd2bd0f194940c7710d8ed8cf3fb99d21
Component: engine
2017-08-14 15:52:21 +02:00
1a431d82d1 Test cases for new ipc modes
These test cases cover various arguments for docker create/run --ipc
option, as well as daemon's --default-ipc-mode cli option and
configuration file parameter.

For the description of container IPC modes, see previous commit.

To run these:

	TESTFLAGS='-check.f IpcMode' make test-integration-cli

[v2: simplify TestDaemonEvents(), add default-ipc-mode presense check]
[v3: add TestDaemonIpcModeVSRestart]
[v4: ipcmode test now uses client lib instead of CLI (except for exec)]
[v5: nitpicks in comments]
[v6: add test case for "none"; fix a typo; simplify TestDaemonEvents() more]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 9a60e1cc874402d10eb7e45f62cce25bf5c41d30
Component: engine
2017-08-14 11:00:26 +03:00
0f9d35cd6f Merge pull request #34000 from dnephin/test-integration-api
Introduce `test-integration` target
Upstream-commit: f34e4d295d5c17a78c33beb14b65e5d001c16968
Component: engine
2017-08-11 10:39:27 -07:00
e443662141 Protect images in the integration/ suite
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5fa134b9061d0b794e9e5b887a8ea4ee15fecb61
Component: engine
2017-08-09 11:02:57 -04:00
43db8c0c15 Introduce test-integration target (and deprecate/freeze test-integration-cli)
This adds a new package `integration` where `engine` integration tests
should live. Those integration tests should not depends on any `cli`
components (except from the `dockerd` daemon for now — to actually
start a daemon).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6b025a8b665f7b976bb2560488ba07f55dbf0fb6
Component: engine
2017-08-09 11:02:57 -04:00
de9b157e25 hide swarm plugins behind experimental flag
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 493002021094d72d405e1cd5bfa10b8080f67920
Component: engine
2017-08-08 18:33:25 -07:00
fae0c281b6 Windows: Add named pipe mount support
Current insider builds of Windows have support for mounting individual
named pipe servers from the host to the guest. This allows, for example,
exposing the docker engine's named pipe to a container.

This change allows the user to request such a mount via the normal bind
mount syntax in the CLI:

  docker run -v \\.\pipe\docker_engine:\\.\pipe\docker_engine <args>

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 54354db850664783918a1fc9d208bcfcf47c28e2
Component: engine
2017-08-07 11:34:36 -07:00
39189fe164 Fix api server null pointer def on inspect/ls null ipam-driver networks
- When a network is created with the null ipam driver, docker api server
  thread will deference a nil pointer on `docker network ls` and on
  `docker network inspect <nw>`. This because buildIpamResource()
  assumes a gateway address is always present, which is not correct.

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
Upstream-commit: beebfc0cf6240c8af511eb4d7e29314c8de6ddf2
Component: engine
2017-08-03 13:35:58 -07:00
9762198ec1 Merge pull request #34272 from dmcgowan/update-logrus
Update logrus to v1.0.1 (Sirupsen -> sirupsen)
Upstream-commit: 8af4db6f002ac907b6ef8610b237879dfcaa5b7a
Component: engine
2017-08-01 18:53:33 -07:00
da919a5e5c Windows: Enable TestAPIImagesSaveAndLoad
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4dd9c9448c436f13b4c77453c50133014e4433b2
Component: engine
2017-07-31 18:18:49 -07:00
d659edcaf5 Update logrus to v1.0.1
Fixes case sensitivity issue

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 1009e6a40b295187e038b67e184e9c0384d95538
Component: engine
2017-07-31 13:16:46 -07:00
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
534226435e Remove links when remove container
Steps to reproduce:
```
    # docker run -tid --name aaa ubuntu
    57bfd00ac5559f72eec8c1b32a01fe38427d66687940f74611e65137414f0ada
    # docker run -tid --name bbb --link aaa ubuntu
    23ad18362950f39b638206ab4d1885fd4f50cbd1d16aac9cab8e97e0c8363471
    # docker ps --no-trunc
    CONTAINER ID                                                       IMAGE
    COMMAND             CREATED             STATUS              PORTS
    NAMES
    23ad18362950f39b638206ab4d1885fd4f50cbd1d16aac9cab8e97e0c8363471
    ubuntu              "/bin/bash"         4 seconds ago       Up 3 seconds
    bbb
    57bfd00ac5559f72eec8c1b32a01fe38427d66687940f74611e65137414f0ada
    ubuntu              "/bin/bash"         14 seconds ago      Up 14
    seconds                           aaa,bbb/aaa
    # docker rm -f bbb
    bbb
    # docker ps --no-trunc
    CONTAINER ID                                                       IMAGE
    COMMAND             CREATED             STATUS              PORTS
    NAMES
    57bfd00ac5559f72eec8c1b32a01fe38427d66687940f74611e65137414f0ada
    ubuntu              "/bin/bash"         29 seconds ago      Up 28
    seconds                           aaa,bbb/aaa
    # docker rm --link bbb/aaa
    Error response from daemon: Cannot get parent /bbb for name /bbb/aaa
```

When we rm container `bbb`, we can still see `bbb/aaa` in `docker ps
--no-trunc`. And this link cannot be deleted since container `bbb` has
already been removed.

We should remove links of a container when it is deleted.

Signed-off-by: Yuanhong Peng <pengyuanhong@huawei.com>
Upstream-commit: 600ad5c1b7b736fba6b103eb99ec87efb050b9ec
Component: engine
2017-07-18 12:09:26 +08: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